![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
链表
东篱_
Never forget why you started,and your mission can be accomplished.
展开
-
单链表的直接插入排序
单链表的直接插入排序 1、数组的直接插入排序 void InsertSort(int *a, int len) { for (int i = 1; i < len; ++i) { for (int j = 0; j < i; ++j) { if (a[j]>a[i]) { ...原创 2018-05-21 22:07:36 · 4538 阅读 · 0 评论 -
C++使用数组构造链表
C++使用数组构造链表 1、链表的定义 struct Node{ int value; struct Node* next; }; 2、使用数组构造链表 Node *createList_array(int *a, int n){ Node *root = new Node(); Node *pnode = root; for (int i = 0; i < n - 1; +...原创 2018-11-02 18:41:05 · 5978 阅读 · 0 评论