Given a binary tree, find its maximum depth. The maximum depth is the number of nodes along the longest path from the root node down to the farthest l ...
分类:
其他好文 时间:
2016-09-23 06:36:21
阅读次数:
178
传送门 Description There is a sequence of integers. Your task is to find the longest subsequence that satisfies the following condition: the difference b ...
分类:
其他好文 时间:
2016-09-22 13:17:43
阅读次数:
235
Task description A binary gap within a positive integer N is any maximal sequence of consecutive zeros that is surrounded by ones at both ends in the ...
分类:
其他好文 时间:
2016-09-21 15:46:53
阅读次数:
176
Given a string S, find the longest palindromic substring in S. You may assume that the maximum length of S is 1000, and there exists one unique longes ...
分类:
其他好文 时间:
2016-09-20 06:49:11
阅读次数:
141
Write a function to find the longest common prefix string amongst an array of strings. 让我们在一个字符串中找出所有字符串的共同前缀 ...
分类:
其他好文 时间:
2016-09-19 01:03:18
阅读次数:
171
In the game of DotA, Pudge’s meat hook is actually the most horrible thing for most of the heroes. The hook is made up of several consecutive metallic ...
分类:
其他好文 时间:
2016-09-18 23:45:09
阅读次数:
244
Description ZS the Coder is coding on a crazy computer. If you don't type in a word for a c consecutive seconds, everything you typed disappear! More ...
分类:
其他好文 时间:
2016-09-18 06:27:12
阅读次数:
188
题目链接 http://vjudge.net/problem/POJ-2739 解题思路 先用筛法筛出素数,然后枚举就行了。 代码 ...
分类:
其他好文 时间:
2016-09-17 23:32:36
阅读次数:
142
Given a string, find the length of the longest substring without repeating characters. Examples: Given "abcabcbb", the answer is "abc", which the leng ...
分类:
其他好文 时间:
2016-09-17 00:32:49
阅读次数:
152