Description:Given a binary tree, imagine yourself standing on therightside of it, return the values of the nodes you can see ordered from top to botto...
分类:
其他好文 时间:
2015-06-25 12:10:27
阅读次数:
79
ntile:伪SQL: ntile(:exp) over()NTILEis an analytic function. It divides an ordered data set into a number of buckets indicated byexprand assigns the ap...
分类:
其他好文 时间:
2015-06-25 10:15:39
阅读次数:
151
1. Question求二叉树的最大深度。Given a binary tree, find its maximum depth.The maximum depth is the number of nodes along the longest path from the root node do...
分类:
其他好文 时间:
2015-06-25 00:00:30
阅读次数:
281
#104 Maximum Depth of Binary Tree
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 leaf node...
分类:
其他好文 时间:
2015-06-24 22:38:28
阅读次数:
164
1.使用下面的格式就可以得到f的一个积分表达式: int(f) 2.当然,我们也可以使用int(f, v) 语法来调用int,其中f就是要积分的函数,而v是积分变量。 3.通过调用subs命令,使用给定的条件我们可以计算表达式的数值。要在一个命令中用数代替符号变量,我们要把被代替的...
分类:
其他好文 时间:
2015-06-24 22:26:15
阅读次数:
157
1. Question找字符串数组的最长公共前缀,是所有字符串的。Write a function to find the longest common prefix string amongst an array of strings.2. Solution(O(mn))以第一个字符串作为前缀初值...
分类:
其他好文 时间:
2015-06-24 00:35:28
阅读次数:
125
Leetcode 03 Longest Substring Without Repeating CharactersGiven a string, find the length of the longest substring without repeating characters. For e...
分类:
其他好文 时间:
2015-06-23 23:07:53
阅读次数:
115
题目三: Longest Substring Without Repeating CharactersGiven a string, find the length of the longest substring without repeating characters.For example, ...
分类:
其他好文 时间:
2015-06-23 22:59:27
阅读次数:
112
#14 Longest Common Prefix
Write a function to find the longest common prefix string amongst an array of strings.
这个题求多个字符串的公共前缀,除了要考虑串空外,如果存在公共前缀,那么必定也是第一个串的前缀。
所以可以以第一个串为基准,比较其他串的前缀是否与第一个串相同。
c...
分类:
其他好文 时间:
2015-06-23 11:55:01
阅读次数:
129
题目连接http://acm.hdu.edu.cn/showproblem.php?pid=3530SubsequenceDescriptionThere is a sequence of integers. Your task is to find the longest subsequence ...
分类:
其他好文 时间:
2015-06-22 22:02:05
阅读次数:
177