数据结构
FmikGy
小白一个,请多关照
展开
-
队列(C)
#include<stdio.h> #include<stdlib.h> typedef struct Node{ int data; struct Node* next; }Node; typedef struct Queue{ Node* tailnode; Node* frontnode; int size; }Queue; //创建节点 Node* createnode(int data){ Node* newnode=(N原创 2022-04-17 20:43:31 · 60 阅读 · 0 评论 -
栈代码(C)
#include<stdio.h> #include<stdlib.h> typedef struct Node{ int data; struct Node* next; }Node; typedef struct Stack{ int size; Node* stacktop; }Stack; //创建栈 Stack* createstack(){ Stack* mystack=(Stack*)malloc(sizeof(Stack))原创 2022-04-17 20:42:08 · 122 阅读 · 0 评论 -
链表代码(C)
#include<stdio.h> #include<stdlib.h> typedef struct Node{ int data; struct Node* next; }Node; //打印 void printlist(Node* headnode){ Node* pmove=headnode->next; while(pmove!=NULL){ printf("%d\t",pmove->data);原创 2022-04-17 20:39:02 · 1000 阅读 · 0 评论