- 博客(3)
- 收藏
- 关注
原创 数组实现堆C++
#include<iostream> using namespace std; typedef struct minheap *Heap; typedef struct minheap{ int last,maxsize; int *str; }Minheap; Heap HeapInit (int size){ Heap h=(Heap)malloc(sizeof(Minheap)); h->maxsize=size; h->str=(int...
2021-11-21 14:38:37
430
原创 单链表实现C++
#include<iostream> #include<stdlib.h> using namespace std; typedef struct node *link; typedef struct node{ int element; link next; }Node; link NewNode() { return (link)malloc(sizeof (Node)); } typedef struct llist *List; typedef st...
2021-11-08 23:27:50
306
原创 顺序栈/用数组实现栈
#include<iostream> #define MAXSIZE 100 using namespace std; typedef struct astack { int* top; int * base; int stacksize; }Astack; void stackinit(Astack &a1) { a1.base=new int [MAXSIZE]; a1.top=a1.base; a1.stacks...
2021-09-21 21:00:39
191
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人