STL简介
C++ STL (Standard Template Library标准模板库) 是通用类模板和算法的集合,它提供给程序员一些标准的数据结构的实现如 queues(队列), lists(链表), 和 stacks(栈)等. C++ STL 提供给程序员以下三类数据结构的实现: 标准容器类 顺序性容器 vector 从后面快速的插入与删除,直接访问任何元素 deque 从...
分类:
其他好文 时间:
2014-08-12 22:08:44
阅读次数:
303
描述:输出全排列代码: 1 class Solution: 2 # @param num, a list of integer 3 # @return a list of lists of integers 4 def doSth(self, num): 5 ...
分类:
其他好文 时间:
2014-08-11 17:10:32
阅读次数:
205
DSU stands for ‘decorate, sort, undecorate’ and refers to a pattern that is often useful for sorting lists according to some attribute of elements.For...
分类:
其他好文 时间:
2014-08-10 18:03:30
阅读次数:
204
题目:
You are given two linked lists representing two non-negative numbers. The digits are stored in reverse order and each of their nodes contain a single digit. Add the two numbers and return it as a linked list.
Input: (2 -> 4 -> 3) + (5 -> 6 -> 4)
Outpu...
分类:
其他好文 时间:
2014-08-10 13:08:30
阅读次数:
296
1.聊一聊跳表作者的其人其事
2. 言归正传,跳表简介
3. 跳表数据存储模型
4. 跳表的代码实现分析
5. 论文,代码下载及参考资料
. 聊一聊作者的其人其事
跳表是由William Pugh发明。他在 Communications of the ACM June 1990, 33(6) 668-676 发表了Skip lists: a probabilistic...
分类:
其他好文 时间:
2014-08-08 16:03:46
阅读次数:
189
题目You are given two linked lists representing two non-negative numbers. The digits are stored in reverse order and each of their nodes contain a singl...
分类:
其他好文 时间:
2014-08-07 12:51:00
阅读次数:
188
这个编程题也是java编程思想中的一道例题import java.util.*;/** * The first Thinking in Java example program. Lists system information on * current machine. * * @author ....
分类:
编程语言 时间:
2014-08-05 13:52:29
阅读次数:
235
序列是Python中最基本的数据结构。序列中的每个元素都分配一个数字-它的位置,或索引,第一个索引是0,第二个索引是1,依此类推。Python有6个序列的内置类型,但最常见的是列表和元组。序列都可以进行的操作包括索引,切片,加,乘,检查成员。此外,Python已经内置确定序列的..
分类:
编程语言 时间:
2014-08-05 03:10:48
阅读次数:
352
题目原文:
You are given two linked lists representing two non-negative numbers. The digits are stored in reverse order and each of their nodes contain a single digit. Add the two numbers and return it ...
分类:
其他好文 时间:
2014-08-05 00:51:58
阅读次数:
257
问题:有序合并两个有序链表分析:归并排序的合并部分class Solution {public: ListNode *mergeTwoLists(ListNode *l1, ListNode *l2) { ListNode *helper=new ListNode(0); ...
分类:
其他好文 时间:
2014-08-02 18:17:03
阅读次数:
170