跟着Sedgewick学算法(week 1 ElementarySort)
零、Total Order
A total orderis a binary relation ≤that satisfies:
1。Antisymmetry: if v ≤ w and w ≤ v, then v= w.
2。Transitivity: if v ≤ w and w ≤ x, then v ≤ x.
一、选择排序
二、插入排序

the 3x+1 increments is O(N3/2).
.png)
四、随机序列
of the input array, provided no duplicate values,where assuming real numbers uniformly at random
{
int N = a.length;for (int i = 0; i < N; i++){
int r = Random(i + 1);swap(ref a, i, r);
}
.png)
五 凸集
.png)
.png)
跟着Sedgewick学算法(week 1 ElementarySort)的更多相关文章
- 跟着Sedgewick学算法(week 1 UnionFind)
发现笔记转过来,没有图的~~~~~~~~~~~悲剧,给出共享笔记链接 https://www.evernote.com/pub/yanbinliu/algorithm 很久之前就在coursera看到 ...
- 1164: 零起点学算法71——C语言合法标识符(存在问题)
1164: 零起点学算法71——C语言合法标识符 Time Limit: 1 Sec Memory Limit: 64 MB 64bit IO Format: %lldSubmitted: 10 ...
- 1163: 零起点学算法70——Yes,I can!
1163: 零起点学算法70--Yes,I can! Time Limit: 1 Sec Memory Limit: 64 MB 64bit IO Format: %lldSubmitted: ...
- 1147: 零起点学算法54——Fibonacc
1147: 零起点学算法54--Fibonacc Time Limit: 1 Sec Memory Limit: 64 MB 64bit IO Format: %lldSubmitted: 20 ...
- 1145: 零起点学算法52——数组中删数II
1145: 零起点学算法52--数组中删数II Time Limit: 1 Sec Memory Limit: 64 MB 64bit IO Format: %lldSubmitted: 293 ...
- 1137: 零起点学算法44——多组测试数据输出II
1137: 零起点学算法44--多组测试数据输出II Time Limit: 1 Sec Memory Limit: 64 MB 64bit IO Format: %lldSubmitted: ...
- 1136: 零起点学算法43——多组测试数据输出I
1136: 零起点学算法43--多组测试数据输出I Time Limit: 1 Sec Memory Limit: 128 MB 64bit IO Format: %lldSubmitted: ...
- 1135: 零起点学算法42——多组测试数据(求和)IV
1135: 零起点学算法42--多组测试数据(求和)IV Time Limit: 1 Sec Memory Limit: 64 MB 64bit IO Format: %lldSubmitted ...
- 1134: 零起点学算法41——多组测试数据(a+b)III
1134: 零起点学算法41--多组测试数据(a+b)III Time Limit: 1 Sec Memory Limit: 64 MB 64bit IO Format: %lldSubmitt ...
随机推荐
- CSS3的笔记总结
css3 就是css2 的一个升级版本.css2 是用来做效果渲染的,而css3 可以使做出来的效果更佳丰富. C3有兼容性问题,移动端支持稍微要好些. 坚持以下原则: ...
- Codeforces Round #516 (Div. 2)D. Labyrinth
D. Labyrinth 题目链接:https://codeforces.com/contest/1064/problem/D 题意: 给出一个n*m的矩阵以及人物的起点,并且给出x,y,分别代表这个 ...
- poj 2723 Get Luffy Out-2-sat问题
Description Ratish is a young man who always dreams of being a hero. One day his friend Luffy was ca ...
- tornado获取application/json类型的入参
tornado本身是不支持直接获取json入参的,在BaseHandler中定义方法get_json_argument,以供调用 class BaseHandler(tornado.web.Reque ...
- 优化web前端性能的几个方法
1 减少http请求, a. 合并脚本跟样式文件,如可以把多个 CSS 文件合成一个,把多个 JS 文件合成一个. b. CSS Sprites 利用 CSS background 相关元素进行背景图 ...
- 控制属性为multiple的select
需求:实现点击查询,搜索对应渠道已投放.未投放批次.如图: html: <div class="form-inline margin-top-20"> <div ...
- md5 加解密
using JGDJWeb.Model; using System; using System.Collections.Generic; using System.IO; using System.L ...
- [ CodeVS冲杯之路 ] P1091
不充钱,你怎么AC? 题目:http://codevs.cn/problem/1091/ 大家都写的 DFS,然而我想到了一种贪心的做法,重点是可以A 普遍的贪心是每次删掉该深度子树最大的点,但是如果 ...
- [bzoj2245][SDOI2011]工作安排——费用流
题目大意: 传送门 题解: 很容易建模,把每一个工作人员拆成两个点,由第一个点向第二个点连S+1条边即可. 这水题没什么难度,主要是longlong卡的丧心病狂... 代码 #include < ...
- linux下修改mysql数据库编码后无法启动解决办法
linux下老版本的Mysql修改数据库编码的方法是 修改my.cnf vi /etc/my.cnf 在[client]下添加 default-character-set=utf8 在[mysqld] ...