题目Given a binary search tree, write a function kthSmallest to find the kth smallest element in it.Note:
You may assume k is always valid, 1 ≤ k ≤ BST’s total elements.Follow up:
What if the BST is m...
分类:
其他好文 时间:
2015-08-03 14:50:03
阅读次数:
112
Problem Description
My birthday is coming up and traditionally I'm serving pie. Not just one pie, no, I have a number N of them, of various tastes and of various sizes. F of my friends are coming to ...
分类:
其他好文 时间:
2015-08-03 14:38:08
阅读次数:
102
题目链接题意:有两个字符串s1,s2;经过交叉问是否得到字符串s,不能输出-1,能就输出交叉的次数每次重组的串都是s2开始,重新组合时,前面一半是s1,后一半s2;#include#include#include#include#include#include#define N 250using n...
分类:
其他好文 时间:
2015-08-03 12:59:17
阅读次数:
127
Ctrl+/或Ctrl+Shift+/注释(//或者/*…*/)Shift+F6重构-重命名Ctrl+X删除行Ctrl+D复制行Ctrl+G查找行Ctrl+Shift+Up/Down代码向上/下移动。F2或Shift+F2高亮错误或警告快速定位写代码,按Tab生成代码选中文本,按Ctrl+Shift...
分类:
Web程序 时间:
2015-08-03 10:06:07
阅读次数:
127
A trickier Dijkstra.#include #include #include #include #include #include #include #include #include using namespace std;const int INF = std::numeric_...
分类:
其他好文 时间:
2015-08-03 07:50:30
阅读次数:
112
after work for almost two years, I have realize the truth notes can help a lot for us. avoiding my lazy life, I decide to sign something important up....
分类:
其他好文 时间:
2015-08-02 23:16:17
阅读次数:
111
Don't forget to say greetings to Uncle Wang.How's it going? Great . Cool.Take care.See you later.Alligator.How are you getting along?What's up? Nothin...
分类:
其他好文 时间:
2015-08-02 22:53:52
阅读次数:
96
hdu 4292 FoodDescription
You, a part-time dining service worker in your college’s dining hall, are now confused with a new problem: serve as many people as possible.
The issue comes up as people...
分类:
其他好文 时间:
2015-08-02 21:40:19
阅读次数:
220
Given an array of integers, find two numbers such that they add up to a specific target number.The function twoSum should return indices of the two numbers such that they add up to the target, where in...
分类:
其他好文 时间:
2015-08-02 18:20:21
阅读次数:
112
DescriptionThe doggie found a bone in an ancient maze, which fascinated him a lot. However, when he picked it up, the maze began to shake, and the dog...
分类:
其他好文 时间:
2015-08-02 18:13:13
阅读次数:
81