原创 循環隊列--數組實現

<pre name="code" class="cpp"># include <stdio.h> # include <malloc.h> # define len 6 //隊列長度 typedef struct

原创 DFS--深度優先搜索--圖的鄰接表表示

# include <stdio.h> # include <malloc.h> # include <stdlib.h> # include <memory.h> # define ok 1 # define NULL 0 # def

原创 圖的鄰接表表示

#include <iostream> using namespace std; #include <stdio.h> #include <stdlib.h> #define OK 1 #define NULL 0 #define M

原创 DFS--深度優先搜索--圖的鄰接矩陣

# include <stdio.h> # include <malloc.h> # include <memory.h> # define MAX 10 //最大頂點數 typedef struct { char vexs[

原创 棧——鏈表實現

</pre><pre name="code" class="cpp"><pre name="code" class="cpp"># include <stdio.h> # include <malloc.h> # include <std

原创 鏈表——數組實現

# include <stdio.h> # include <malloc.h> # include <stdlib.h> typedef struct ARR { int * pbase; //數據域 int len

原创 堆排序

堆排序:根據輸入數據,利用堆的調整算法形成初始堆,然後交換根元素與尾元素,總的元素個數減1,然後從根往下調整。堆排序的最好、最壞、平均時間複雜度都爲O(nlogn) # include <stdio.h> void heap_adjus

原创 二叉樹--鏈表實現

# include <stdio.h> # include <malloc.h> typedef struct TREE { char data; struct TREE * lchild; struct TREE * rchil

原创 約瑟夫環--鏈表實現

# include <stdio.h> # include <malloc.h> typedef struct Node { int data; struct Node * next; }NODE,*pnode; typedef

原创 直接選擇排序

直接選擇排序:每一趟從待排序的記錄中選出關鍵字最小的記錄,順序放在已排好序的子文件的最後,直到全部記錄排序完畢。 # include <stdio.h> void select_sort(int a[],int len); int

原创 BFS-圖的廣度優先搜索--鄰接矩陣

# include <stdio.h> # include <malloc.h> # include <memory.h> # define MAX 20 //最大頂點數 typedef struct { char vexs

原创 BFS--廣度優先搜索--圖的鄰接表

# include <stdio.h> # include <malloc.h> # include <memory.h> # define MAX 20 //頂點最大值 typedef struct ARCNODE { in

原创 直接插入排序

直接插入排序:每次將一個待排序的記錄,按其關鍵字大小插入到前面已經排好序的子文件中的適當位置,直到全部記錄插入完成爲止。當數組已經排好序,直接插入排序的時間複雜度爲O(n) # include <stdio.h> void insert

原创 DFS--圖中兩點之間的路徑

# include <stdio.h> # include <memory.h> # include <malloc.h> # define MAX 20 //最大頂點數 typedef struct VNODE { int

原创 狀態欄的使用

沉浸模式: 遊戲和愛奇藝電影 Android 4.4 及以上可以實現 狀態欄透明: Android 5.0及以上纔可以使用 隱藏底部導航欄: View.SYSTEM_UI_FLAG_LAYOUT_HIDE_