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-10-31 00:43:28
阅读次数:
212
Given an integer matrix, find the length of the longest increasing path. From each cell, you can either move to four directions: left, right, up or do ...
分类:
其他好文 时间:
2016-10-29 07:51:49
阅读次数:
226
div 语义:Division(分隔) span 语义:Span(范围) ol 语义:Ordered List(排序列表) ul 语义:Unordered List(不排序列表) li 语义:List Item(列表项目) dl 语义:Definition List(定义列表) dt 语义:Defi ...
分类:
其他好文 时间:
2016-10-28 09:40:27
阅读次数:
357
找到提供的句子中最长的单词,并计算它的长度。 函数的返回值应该是一个数字。 主要考察 split() 和 sort() 的用法,注意倒序排列的方法,很常用,也很基础。 ...
分类:
其他好文 时间:
2016-10-27 00:18:52
阅读次数:
165
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-10-26 13:07:52
阅读次数:
156
Given a string that consists of only uppercase English letters, you can replace any letter in the string with another letter at most k times. Find the ...
分类:
其他好文 时间:
2016-10-26 09:40:13
阅读次数:
431
Milk Patterns Description Farmer John has noticed that the quality of milk given by his cows varies from day to day. On further investigation, he disc ...
分类:
编程语言 时间:
2016-10-26 00:14:31
阅读次数:
224
感觉需要注意的点就是在A-Z和a-z之间还夹了6个其他的字符,所以统计的时候不能用new int[52]需要new int[58] 代码; ...
分类:
其他好文 时间:
2016-10-25 14:35:48
阅读次数:
163
原题链接: https://leetcode.com/problems/longest-absolute-file-path/ Suppose we abstract our file system by a string in the following manner: The string "d ...
分类:
其他好文 时间:
2016-10-25 13:44:39
阅读次数:
147
题目:找出字符串中最长的唯一回文串 两个解法: 一(O^n2): 分析:动态规划,flag[i][j]为true表示下标i,j之间的子串是回文串,保存上次的flag状态,判断此时下标为i,j的字符是否相等,得出此时的flag状态 代码: public class Solution { public ...
分类:
其他好文 时间:
2016-10-25 02:41:53
阅读次数:
165