- 博客(4)
- 收藏
- 关注
原创 哈希表线性探测法和二次探测法详细代码
#include <stdio.h>#include <stdlib.h>#include <windows.h>#include <assert.h>typedef int Key;typedef int(*HashFunc)(Key, int);//定义每个位置的状态信息typedef enum { EXISTED, DE...
2018-07-28 16:58:14 4324 1
原创 数据结构——冒泡排序,C语言实现
#include <stdio.h>#include <stdlib.h>#include <assert.h>#include <unistd.h>void Swap(int *a, int *b){ int temp = *a; *a = *b; *b = temp;}void BubbleSort(int arr[],...
2018-07-25 23:44:04 544
原创 数据结构——选择排序,C语言描述
#include <stdio.h>#include <stdlib.h>#include <unistd.h>#include <assert.h>//选择排序://拿除这些元素中的第一个或某一个元素,与其他所有元素一次比较//如果不符合所规定的顺序就交换被比较的元素和这个用来比较的元素//用交换之后的元素接着当前位置继续往后来比...
2018-07-25 23:42:44 207
原创 数据结构——堆,C语言实现
#include <stdio.h>#include <stdlib.h>#include <assert.h>#include <string.h>#include <unistd.h>typedef struct Heap { int arr[30]; int size;} Heap;void HeapInit...
2018-07-25 23:41:09 340
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人