
datastructures/algorithms
鸟类学
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
单链表(创建<14种功能>,逆序,合并)
#include #include //结点的数据类型 typedef struct Node{ int data; struct Node*next; }Node; //链表类型 typedef struct List{ Node *head; }List; //1创建节点 Node* CreateNode(int da原创 2015-09-01 23:30:06 · 551 阅读 · 0 评论 -
双向链表(无注释...慎入)
#include #include typedef struct Node{ int data; struct Node*prev; struct Node*next; }Node; typedef struct List{ Node* head; Node* tail; }List; Node * NodeCreate(int原创 2015-09-01 23:33:32 · 376 阅读 · 0 评论 -
八种常用排序算法
#include #include #include #define LEN 10 // 1 冒泡:将序列每轮找出的最大值从下标n到0依次存放 void Bubble(int * data,int len){ int i,j; for (i=0;i 2从第一对到最后一对,做步骤1的操作,这样遍历一次最后的元素就为数组最大的元素 3对除原创 2015-09-01 23:38:49 · 455 阅读 · 0 评论 -
二叉树
#include #include typedef struct Node {//结点类型 int data; struct Node* left; struct Node* right; }Node; typedef struct Tree {//二叉树的类型 Node*root;//指向根结点的指针 int count;//记录结点个数 }Tree; //1 创建结点 Node*Cr原创 2017-02-08 11:51:46 · 335 阅读 · 0 评论