
数据结构
神秘的企鹅
Freshman
展开
-
队列 (链式结构)
头文件MyQueue.h#ifndef _MYQUEUE_H_#define _MYQUEUE_H_#include <stdlib.h>#include <stdbool.h>typedef struct Node *pNode;typedef struct Queue *pQueue; // 相当于 pHeadstruct Node{ int data; pNode next;};struct Queue原创 2021-11-27 16:07:31 · 510 阅读 · 0 评论 -
链表——环形链表
头文件cList.h#ifndef _CLIST_H_#define _CLIST_H_#include <stdio.h>#include <stdlib.h>#include <stdbool.h>struct Node;typedef struct Node *pNode;struct Head;typedef struct Head *pHead;struct Node{ int data; pNode next;原创 2021-11-27 14:48:16 · 1043 阅读 · 0 评论 -
栈(链式结构)
头文件MyStack.h#ifndef _MYSTACK_H_#define _MYSTACK_H_#include <stdio.h>#include <stdbool.h>#include <stdlib.h>#define MAXN 1024#define INFINITY 65535typedef struct Node *pNode;typedef struct Stack *LinkStack;struct Node{原创 2021-11-26 20:46:20 · 938 阅读 · 0 评论 -
链表——双链表
头文件 MyList.h#ifndef _MYLIST_H_#define _MYLIST_H_#include <stdio.h>#include <stdlib.h>#include <stdbool.h>struct Node;typedef struct Node *pNode;struct Head;typedef struct Head *pHead;pHead Create (void);原创 2021-11-26 15:47:16 · 212 阅读 · 0 评论