原题地址:https://oj.leetcode.com/problems/search-for-a-range/题意:Given
a sorted array of integers, find the starting and ending position of a given
target ...
分类:
编程语言 时间:
2014-06-08 21:03:21
阅读次数:
297
最近忽然突发奇想,想统计一下我最经常上的网站是哪些,并且在这些网站上都停留了多久。为此决定写一个BHO插件来做这件事。BHO(Browser
Help Objects)是实现了特定接口(IObjectWithSite)的COM组件。开发好的BHO插件除了要在注册表中注册为COM
Server外,还必...
分类:
其他好文 时间:
2014-06-08 20:13:20
阅读次数:
314
题目
Given n, how many structurally unique BST's (binary search trees) that store values 1...n?
For example,
Given n = 3, there are a total of 5 unique BST's.
1 3 3 2 ...
分类:
其他好文 时间:
2014-06-08 17:06:58
阅读次数:
235
题目
Two elements of a binary search tree (BST) are swapped by mistake.
Recover the tree without changing its structure.
Note:
A solution using O(n)
space is pretty straight forward. Cou...
分类:
其他好文 时间:
2014-06-08 15:32:45
阅读次数:
245
POJ 2391 Ombrophobic Bovines (二分,最短路径,网络流(sap,dinic,预留推进) )
题目大意:
有n头奶牛及牛棚,以及m条边,接下来告诉你n行,每行表示这个牛棚奶牛实际数目,以及能容纳的数目,接下来m行告诉你奶牛从一个牛棚到另一个牛棚所需要的时间,问你,是否所有奶牛能够到达牛棚,如果不能,输出-1,如果能,输出最短时间。
解题思路:
这种最短时间,想到了二分,是否能到达,想到了最短路径,是否能全部容纳,想到了构建一张网络图,来解决。
这题采用了三种网络流解法,sap...
分类:
其他好文 时间:
2014-06-08 15:31:12
阅读次数:
335
题目
Given n, generate all structurally unique BST's (binary search trees) that store values 1...n.
For example,
Given n = 3, your program should return all 5 unique BST's shown below.
...
分类:
其他好文 时间:
2014-06-08 15:15:26
阅读次数:
223
Suppose a sorted array is rotated at some pivot
unknown to you beforehand.(i.e.,0 1 2 4 5 6 7might become4 5 6 7 0 1 2).You are
given a target value t...
分类:
其他好文 时间:
2014-06-08 02:05:43
阅读次数:
311
Follow up for "Search in Rotated Sorted
Array":What ifduplicatesare allowed?Would this affect the run-time complexity?
How and why?Write a function to...
分类:
其他好文 时间:
2014-06-08 01:19:29
阅读次数:
320
linux
grep命令详解http://www.cnblogs.com/ggjucheng/archive/2013/01/13/2856896.htmlgrep
(global search regular expression(RE) and print out the line,全面搜索正则...
分类:
系统相关 时间:
2014-06-07 22:50:42
阅读次数:
387
一般我们在xcode里面配置包含工程目录下头文件的时候,都要关联着相对路径和绝对路径,如果只是自己用这个项目,用绝对路径的问题不大,但是如果你把工程发给别人,别人就要在改这个绝对路径,这时候绝对路径的缺点立马出现。所以在修改User
Header Search Paths这个选项的时候使用"$(SR...
分类:
其他好文 时间:
2014-06-07 17:01:15
阅读次数:
220