- 博客(6)
- 收藏
- 关注
原创 LeetCode Count and say
The count-and-say sequence is the sequence of integers beginning as follows:1, 11, 21, 1211, 111221, ...1 is read off as "one 1" or 11.11 is read off as "two 1s" or 21.21 is read off as
2014-06-13 17:23:46 715
原创 LeetCode Merge Intervals
Given a collection of intervals, merge all overlapping intervals.For example,Given [1,3],[2,6],[8,10],[15,18],return [1,6],[8,10],[15,18].一开始sb了 用数组记录
2014-06-04 18:30:47 417
原创 LeetCode PathSum
Given a binary tree and a sum, determine if the tree has a root-to-leaf path such that adding up all the values along the path equals the given sum.For example:Given the below binary tree and sum
2014-06-03 17:53:35 449
原创 LeetCode Decode Way
A message containing letters from A-Z is being encoded to numbers using the following mapping:'A' -> 1'B' -> 2...'Z' -> 26Given an encoded message containing digits, determine the total nu
2014-06-02 22:38:31 562
转载 c++ 容器用法总结 转载。
C++中的容器大致可以分为两个大类:顺序容器和关联容器。顺序容器中有包含有顺序容器适配器。顺序容器:将单一类型元素聚集起来成为容器,然后根据位置来存储和访问这些元素。主要有vector、list、deque(双端队列)。顺序容器适配器:stack、queue和priority_queue。关联容器:支持通过键来高效地查找和读取元素。主要有:pair、set、map、multiset
2014-02-15 15:48:10 529
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人