LeetCode Roman to Integer 解题报告: 把一个字符串形式的罗马字符串转为数字。...
分类:
其他好文 时间:
2014-12-21 22:13:24
阅读次数:
193
Validate Binary Search TreeGiven a binary tree, determine if it is a valid binary search tree (BST).Assume a BST is defined as follows:The left subtre...
分类:
其他好文 时间:
2014-12-21 21:55:07
阅读次数:
230
Longest Common PrefixWrite a function to find the longest common prefix string amongst an array of strings.Show TagsSOLUTION 1:解法很直观。先找到最小长度,然后逐个字母遍历,...
分类:
其他好文 时间:
2014-12-21 20:35:48
阅读次数:
189
Maximum SubarrayFind the contiguous subarray within an array (containing at least one number) which has the largest sum.For example, given the array [...
分类:
其他好文 时间:
2014-12-20 20:51:21
阅读次数:
386
Majority Number II 原题链接: http://lintcode.com/en/problem/majority-number-ii/#Given an array of integers, the majority number is the number that occurs ...
分类:
其他好文 时间:
2014-12-20 20:46:22
阅读次数:
301
Interleaving Positive and Negative Numbers 原题链接 : http://lintcode.com/zh-cn/problem/interleaving-positive-and-negative-numbers/Given an array with pos...
分类:
其他好文 时间:
2014-12-20 18:08:37
阅读次数:
404
Implement Queue by Stacks 原题链接 : http://lintcode.com/zh-cn/problem/implement-queue-by-stacks/#As the title described, you should only use two stacks t...
分类:
其他好文 时间:
2014-12-20 16:46:10
阅读次数:
270
题目链接:http://codeforces.com/problemset/problem/495/C题目意思:给出一串只有三种字符( ')','(' 和 '#')组成的字符串,每个位置的这个字符 '#'可以替换成不少于 1 个的 ')',问如何对每个'#'进行替换,使得对于字符串的任意一个位置, ...
分类:
其他好文 时间:
2014-12-20 15:24:18
阅读次数:
221
Majority Number 原题链接:http://lintcode.com/en/problem/majority-number/#Given an array of integers, the majority number is the number that occurs more th...
分类:
其他好文 时间:
2014-12-20 08:13:29
阅读次数:
306
Fast Power 原题链接:http://lintcode.com/en/problem/fast-power/#Calculate the an% b where a, b and n are all 32bit integers.ExampleFor 231 % 3 = 2For 10010...
分类:
其他好文 时间:
2014-12-19 23:22:09
阅读次数:
241