![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
algorithm
suilingxi
这个作者很懒,什么都没留下…
展开
-
直接插入排序算法
原创 2014-01-12 10:46:56 · 435 阅读 · 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 · 549 阅读 · 0 评论 -
冒泡排序算法
原创 2014-01-12 21:06:18 · 373 阅读 · 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 · 416 阅读 · 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 · 463 阅读 · 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 · 1392 阅读 · 0 评论 -
基于链表实现堆栈
#ifndef LINK_STACK_H#define LINK_STACK_Hstruct 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 · 527 阅读 · 0 评论 -
基于链表实现队列
#ifndef LINK_QUEUE_H#define LINK_QUEUE_Hstruct 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 · 414 阅读 · 0 评论 -
排序二叉树的构造与遍历
#ifndef SORT_BINARY_TREE_H#define SORT_BINARY_TREE_Hstruct 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 · 694 阅读 · 0 评论