![](https://img-blog.csdnimg.cn/20201014180756926.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
数据结构
qq_33528164
爱好共享,提倡互相帮助。
展开
-
栈
栈只允许在一端进行输入输出操作的线性表。基本操作InitStack(&S);StackEmpty(S);Push(&S, Element);Pop(&s, &Element);GetTop(S, &Element);ClearStack(&S);基本操作代码Ini原创 2019-02-22 16:49:20 · 131 阅读 · 0 评论 -
队列
队列一种操作受限的线性表,只允许在表的一端进行插入,而在表的另一端进行删除.队列的顺序存储结构void InitQueue(SqQueue &s){ s.rear = s.front = 0;}bool IsEmpty(SqQueue s){ if(s.front == s.rear){ return true; } retur...原创 2019-02-23 23:27:38 · 341 阅读 · 1 评论 -
leetcode 207 Course Schedule
Leetcode Topological SortBFSpublic: vector<int> degree; map<int, vector<int>> graph; bool canFinish(int numCourses, vector<vector<int>>& prerequisites) { degre...原创 2019-09-03 20:51:56 · 235 阅读 · 0 评论