1038. Recover the Smallest Number (30)Given a collection of number segments, you are supposed to recover the smallest number from them. For example, g...
分类:
其他好文 时间:
2015-08-11 21:17:55
阅读次数:
102
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...
分类:
其他好文 时间:
2015-08-09 12:38:18
阅读次数:
141
Given a binary search tree, write a functionkthSmallestto find thekth smallest element in it.Note:You may assume k is always valid, 1 ≤ k ≤ BST's tota...
分类:
其他好文 时间:
2015-08-08 17:49:17
阅读次数:
121
//有3个国家名,找出按字母顺序排在最前面的国家字符串
代码如下:
#include
#include
using namespace std;
int main()
{
void smallest_string(char str[ ][30],int i);//函数声明
int i;
char country_name[3][30];//定义二维字符数组,把一个二...
分类:
编程语言 时间:
2015-08-07 20:13:51
阅读次数:
130
UVa11997 K Smallest Sums题目: K Smallest SumsYou're given k arrays, each array has k integers. There are kkways to pick exactly one element in each arra...
分类:
其他好文 时间:
2015-08-07 13:17:34
阅读次数:
108
leetcode原文引用:
Write a SQL query to delete all duplicate email entries in a table named Person,
keeping only unique emails based on its smallest Id.
+----+------------------+
| Id | Email ...
分类:
数据库 时间:
2015-08-05 22:14:48
阅读次数:
144
Given a binary search tree, write a functionkthSmallestto find thekth smallest element in it.Note:You may assume k is always valid, 1 ≤ k ≤ BST's tota...
分类:
其他好文 时间:
2015-08-05 19:57:54
阅读次数:
123
The Kth smallest element in a BST
分类:
其他好文 时间:
2015-08-04 09:25:26
阅读次数:
113
题目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
【最小矩形面积覆盖:凸包+旋转卡壳】UVA 10173 Smallest Bounding Rectangle题目链接:UVA 10173 Smallest Bounding Rectangle题目大意给你n个点,求能够覆盖所有点集的最小矩形面积。
笔者的第2道凸包题目,凸包 + 旋转卡壳,实现点集的最小矩形面积覆盖问题
“>=0”写成”<=0“坑了我一下午!QAQ说一下思路
①Graham...
分类:
其他好文 时间:
2015-08-02 23:28:37
阅读次数:
222