
数据结构
文章平均质量分 91
星宇康
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
DFS常见模板题
是原创 2020-07-06 15:58:40 · 823 阅读 · 0 评论 -
堆排序(递归写法、非递归写法、从下标0开始计数、从下标1开始计数)
下标从0开始计数,非递归写法 # include <iostream> # include <algorithm> void sift(int arr[], int start, int end) { int dad = start; int son = dad * 2; while (son <= end) { if (son < end && arr[son] < arr[son + 1]) {原创 2020-06-07 15:11:36 · 674 阅读 · 0 评论 -
Pop Sequence
Given a stack which can keep M numbers at most. Push N numbers in the order of 1, 2, 3, …, N and pop randomly. You are supposed to tell if a given sequence of numbers is a possible pop sequence of the...原创 2020-01-30 12:20:06 · 504 阅读 · 0 评论