版权声明:本博客为个人维护博客,内容均来自原创及互连网转载。最终目的为收集整理自己需要的文章技术等内容,不涉及商业用途。原创文章未经本人许可,不得用于商业用途及传统媒体。网络媒体转载请注明出处,否则属于侵权行为。 https://blog.csdn.net/MarshaZheng/article/details/84666967
第一章 绪论
这道题在《数据结构精讲与习题详解》中有:
对数和n^a(0<a<1)可以利用反函数的增长速率来比较。
第二章 向量
第三章 列表
这里只需保证1,2在4之前就可以了。
最好O(1),最坏O(n).
每段内部最坏的复杂度为O(k+k2)=O(k2),总共有n/k段,需要O(k2 ·n/k)=O(nk),段之间没有逆序对,可以直接拼接,复杂度为O(n/k),总计为O(nk+n/k)=O(nk)。
The stack is initially empty and goes through the following operations in sequence:
栈初始为空,依次经过以下操作:
push(5);
push(8);
pop();
push(5);
top();
push(1);
push(3);
pop();
pop();
push(2);
At this point from the top of the stack to the bottom of the stack:
此时从栈顶到栈底依次为:
- 2, 5, 5
- 2, 3, 1
- 5, 5, 2
- 1, 3, 2