
algorithm
suilingxi
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
直接插入排序算法
原创 2014-01-12 10:46:56 · 471 阅读 · 0 评论 -
折半插入排序算法
#include /* *binary insert sort algorithm *author @ suilingxi *2014-1-11 */ int binary_insert_sort(int * array , int low , int high , int mdm){ while(low<=high){ if(mdm<*(array+(high+low)/2原创 2014-01-12 18:46:25 · 586 阅读 · 0 评论 -
冒泡排序算法
原创 2014-01-12 21:06:18 · 403 阅读 · 0 评论 -
快速排序
#include /* *speed sort *author @ suilingxi *2014-1-15 */ void speed_sort(int * array , int high ,int low){ /* record the position of the array we want to sort */ int i=low; int j=high; int原创 2014-01-15 15:02:15 · 459 阅读 · 0 评论 -
josephus problem
#include #include struct node { int num; struct node * next; }; int main(){ int N; int M; printf("please enter the nubmer of N:\n"); scanf("%d",&N); printf("please enter the nubmer of M:\n")原创 2014-01-27 09:49:57 · 501 阅读 · 0 评论 -
完全二叉树的构造与遍历
#ifndef BinaryTree_H_ #define BinaryTree_H_ struct binarytree { struct binarytree * left; struct binarytree * right; char content; }; int length(char * array); struct binarytree * init(char * p ,原创 2014-01-27 19:02:45 · 1440 阅读 · 0 评论 -
基于链表实现堆栈
#ifndef LINK_STACK_H #define LINK_STACK_H struct linkstack{ struct linkstack * next; int content; }; void display(); void push(struct linkstack * node); struct linkstack * pop(); void init(int * ar原创 2014-01-28 22:09:13 · 573 阅读 · 0 评论 -
基于链表实现队列
#ifndef LINK_QUEUE_H #define LINK_QUEUE_H struct linkqueue{ struct linkqueue * next; int content; }; struct linkqueue * pop(); void push(struct linkqueue * p); void display(); void init(int * arra原创 2014-01-29 08:21:08 · 441 阅读 · 0 评论 -
排序二叉树的构造与遍历
#ifndef SORT_BINARY_TREE_H #define SORT_BINARY_TREE_H struct sbt{ struct sbt * left; struct sbt * right; int content; }; struct sbt * init(int * p ,int n); struct sbt * compare(struct sbt * root , s原创 2014-01-28 12:07:25 · 737 阅读 · 0 评论