题目再现
There are two sorted arrays A and B of size m and n respectively. Find the median of the two sorted arrays. The overall run time
complexity should be O(log (m+n)).
题意解析...
分类:
其他好文 时间:
2014-08-02 18:24:13
阅读次数:
335
Q1.EmEditor中转换C#注释的显示格式,由三行显示成一行1 /// 2 /// 対象期間3 /// 原来格式1 /// 対象期間现在格式A1.使用编辑器的替换功能,Find:///\s*\r\n.+///\s*(.+)\r\n....
分类:
其他好文 时间:
2014-08-02 18:08:43
阅读次数:
201
Single Number II
Given an array of integers, every element appears three times except for one. Find that single one.
Note:
Your algorithm should have a linear runtime complexity. Could you implement it without using extra memory?...
分类:
其他好文 时间:
2014-08-02 12:53:53
阅读次数:
289
Watson gives an array A1,A2...AN to Sherlock. Then he asks him to find if there exists an element in the array, such that, the sum of elements on its ...
分类:
其他好文 时间:
2014-08-02 12:36:13
阅读次数:
185
Dungeon MasterTime Limit:1000MSMemory Limit:65536KTotal Submissions:16468Accepted:6395DescriptionYou are trapped in a 3D dungeon and need to find the ...
分类:
其他好文 时间:
2014-08-02 12:12:43
阅读次数:
220
如何统计代码行数
linux下提供了很多实用工具,甚至在安卓上,都有移植的busybox包含这些工具。根据KISS理念,这些工具的功能很单一。但这些工具组合起来,就可以很方面的统计代码量了。
统计代码行数
流程为:首先使用find命令找到所有后缀名符合规则的源代码文件,之后使用wc命令统计行数。文件数可能过多,为防止出错使用xargs命令分割参数列表,最后得到的结果可以使用sort排...
分类:
其他好文 时间:
2014-08-02 10:04:33
阅读次数:
292
题目:Given a binary tree, find the maximum path sum.The path may start and end at any node in the tree.For example:Given the below binary tree, 1...
分类:
编程语言 时间:
2014-08-02 09:50:13
阅读次数:
232
Lexicographicallyalgorithms:1. Iterate array from back to front, and find the first decreasing point: 1,2,4,3 -- 42. Iterate array from back to front,...
分类:
其他好文 时间:
2014-08-02 05:11:02
阅读次数:
199
Longest Valid ParenthesesGiven a string containing just the characters'('and')', find the length of the longest valid (well-formed) parentheses substr...
分类:
其他好文 时间:
2014-08-02 04:22:40
阅读次数:
248
题目:Given a collection of candidate numbers (C) and a target number (T), find all unique combinations in C where the candidate numbers sums to T.Each ....
分类:
编程语言 时间:
2014-08-02 01:48:12
阅读次数:
246