
Algorithm
做个有思想的程序猿
知识是最便宜的,现在的书可以按斤称,互联网还有免费的资源;知识也是最宝贵的,看你有没有时间把它装进自己的脑袋中再发挥出来。
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
树和二叉树2——遍历
转载自:http://blog.youkuaiyun.com/markcnsc/article/details/8551143转载 2014-06-09 16:46:27 · 262 阅读 · 0 评论 -
红黑树
算法导论读书笔记(13) 目录 红黑树旋转插入 情况1 : z 的叔父结点 y 是红色的情况2 : z 的叔父结点 y 是黑色的,而且 z 是右孩子情况3 : z 的叔父结点 y 是黑色的,而且 z 是左孩子 删除 情况1 : x 的兄弟 w 是红色的情况2 : x 的兄弟 w 是黑色的,且 w 的两个孩子都是黑色的情况3 : x 的兄弟 w 是黑色的,转载 2014-06-13 08:51:02 · 454 阅读 · 0 评论 -
Write a C program to print all permutations of a given string
A permutation, also called an “arrangement number” or “order,” is a rearrangement of the elements of an ordered list S into a one-to-one correspondence with S itself. A string of length n has n! permu转载 2014-07-04 00:29:39 · 510 阅读 · 0 评论 -
pop push min O(1)
#include #include using namespace std; #include #define STACK_LEN 7 typedef struct { int data; int min; }stackitem; typedef struct { stackitem data[STACK_LEN]; int top; }stac原创 2014-07-06 19:53:14 · 342 阅读 · 0 评论 -
动态规划-背包问题
http://www.cnblogs.com/sdjl/articles/1274312.html转载 2014-06-17 09:41:40 · 323 阅读 · 0 评论 -
分治算法之汉诺塔
#include using namespace std; void hanoi(int n,char one,char two,char three); int main() { int m; cout<<"输入盘子数:"; cin>>m; hanoi(m,'A','B','C'); } void move(char x,c原创 2014-07-07 23:06:20 · 367 阅读 · 0 评论 -
QuickSort
void qsort(int s[], int l, int r) { int i, j, x; if (l { i = l; j = r; x = s[i]; while (i { while(i x) j--; /* 从右向左找第一个小于x的原创 2014-07-09 20:23:24 · 248 阅读 · 0 评论 -
SkipList 跳表
转自:http://kenby.iteye.com/blog/1187303 为什么选择跳表 为什么选择跳表 目前经常使用的平衡数据结构有:B树,红黑树,AVL树,Splay Tree, Treep等。 想象一下,给你一张草稿纸,一只笔,一个编辑器,你能立即实现一颗红黑树,或者AVL树 出来吗? 很难吧,这需要时间,要考虑转载 2015-09-08 10:21:05 · 200 阅读 · 0 评论 -
一个图形的算法网站: http://visualgo.net/
visualising data structures and algorithms through animation原创 2015-11-12 12:43:33 · 1989 阅读 · 0 评论