码迷,mamicode.com
首页 >  
搜索关键字:smallest difference    ( 1670个结果
[C++]LeetCode: 93 Binary Search Tree Iterator (经典题,非递归的中序遍历)
题目: Implement an iterator over a binary search tree (BST). Your iterator will be initialized with the root node of a BST. Calling next() will return the next smallest number in the BST. Note:...
分类:编程语言   时间:2015-01-14 18:01:28    阅读次数:182
ural 1260. Nudnik Photographer 规律dp
点击打开链接 1260. Nudnik Photographer Time limit: 1.0 second Memory limit: 64 MB If two people were born one after another with one second difference and one of them is a child, then th...
分类:其他好文   时间:2015-01-14 12:47:15    阅读次数:125
[leetcode]Maximum Gap
问题描述: Given an unsorted array, find the maximum difference between the successive elements in its sorted form. Try to solve it in linear time/space. Return 0 if the array contains less than 2 ele...
分类:其他好文   时间:2015-01-13 23:17:46    阅读次数:330
Java-Binary Search Tree Iterator
Implement an iterator over a binary search tree (BST). Your iterator will be initialized with the root node of a BST. Calling next() will return the next smallest number in the BST. Note: next() a...
分类:编程语言   时间:2015-01-13 14:25:39    阅读次数:240
Java-Maximum Gap
Given an unsorted array, find the maximum difference between the successive elements in its sorted form. Try to solve it in linear time/space. Return 0 if the array contains less than 2 elements. Y...
分类:编程语言   时间:2015-01-12 22:34:27    阅读次数:274
git
git initgit add *git commit -m "aaa" (git commit) (git commit -v)git statusgit diff #see the difference between modified files and staged files (git d...
分类:其他好文   时间:2015-01-12 06:51:03    阅读次数:337
Find the k-th Smallest Element in the Union of Two Sorted Arrays
Given two sorted arrays A, B of size m and n respectively. Find the k-th smallest element in the union of A and B. You can assume that there are no du...
分类:其他好文   时间:2015-01-11 22:48:15    阅读次数:187
Arrange an Array to Form a Smallest Digit
#include #include #include #include #include "oj.h" using namespace std; bool comp(int iElem1, int iElem2) { string str1; char ch1[100]; memset(ch1, 0, sizeof(char) * 100); itoa(iElem1, ch1, ...
分类:其他好文   时间:2015-01-10 15:17:15    阅读次数:153
good article————K’th Smallest/Largest Element in Unsorted Array | Set 2 (Expected Linear Time)
这是本人在研究leetcode中Median of Two Sorted Arrays一题目的时候看到一篇文章,觉得非常好,其中对快速排序重新实现。 文章来源于http://www.geeksforgeeks.org/这个网站。 We recommend to read following post as a prerequisite of this post. K’th Sma...
分类:其他好文   时间:2015-01-09 10:45:54    阅读次数:189
Binary Search Tree Iterator
Implement an iterator over a binary search tree (BST). Your iterator will be initialized with the root node of a BST. Calling next() will return the next smallest number in the BST. Note: next()...
分类:其他好文   时间:2015-01-06 20:09:24    阅读次数:159
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!