数据结构
KLNL100
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
遍历一次求单链表中间节点
Node* FindMid(Node* head){if(NULL == head||NULL = head->next)return head;Node *p = head->next;;Node *q = p;while(NULL != p){p = p->next->next;q = q->next;}return q;}原创 2014-03-21 17:07:32 · 775 阅读 · 0 评论 -
函数传递的时候参数传递和栈帧结构
调用函数的时候首先进行参数压栈,一般情况下压栈顺序为从右到左,最有压函数的地址;在windows平台下,栈都是从下到上生长的原创 2014-03-22 23:50:29 · 1126 阅读 · 0 评论 -
双链表的建立
#includeusing namespace std;struct Node{int data;Node * pre;Node* Next;}Node *Creat(){Node * head;head->pre = NULL;head->data = NULL;Node* p = head;Node* q = head;Node* s原创 2014-03-21 17:30:46 · 563 阅读 · 0 评论 -
关于数据结构的一个疑问
为什么如果按index访问item并就地插入或删除数据 这种操作比较频繁 ,为什么使用数组最节省时间原创 2014-03-21 19:13:13 · 875 阅读 · 0 评论 -
队列的入列和出列
#includeusing namespace std;typedef struct student{int data;student *next;}node;typedef struct linkqueue{node* first,*rear;}queue1;//队列的入队queue *insert(queue1 *HQ,int x){转载 2014-03-21 23:08:00 · 4548 阅读 · 0 评论
分享