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 ...
分类:
其他好文 时间:
2017-07-11 11:08:51
阅读次数:
191
老外提问: Hi, I have an sql query which takes 8 seconds in the first run. The next run there after takes 0.5 seconds and all consecutive runs take 0.5 sec ...
分类:
数据库 时间:
2017-07-10 20:16:34
阅读次数:
587
基于版本jdk1.7.0_80 java.util.concurrent.locks.AbstractQueuedSynchronizer 代码如下 /* * ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. * * ...
分类:
其他好文 时间:
2017-07-08 13:29:21
阅读次数:
163
题目 URL:https://leetcode.com/problems/longest-palindromic-substring 解法 一、循环搜索 对于每一个字符,往后搜索,遇到相同字符,开始判断是否回文串,若是回文串则与当前最长回文串的长度比较,若更长,则更新最长回文串。 显然是三层循环:第 ...
分类:
其他好文 时间:
2017-07-05 23:04:00
阅读次数:
253
这两题有一个 trick 和 Minimum Window Substring 非常像,就是维护一个 "curCount" 代表目前 (i,j) 之间 match 上的数量,而通过 hash[] 的正负充当计数器的作用 ...
分类:
其他好文 时间:
2017-07-05 22:56:46
阅读次数:
170
https://leetcode.com/problems/longest-word-in-dictionary-through-deleting/#/solutions ...
分类:
其他好文 时间:
2017-07-05 15:22:01
阅读次数:
119
这个也是简单题目。可是关键在于题意的理解。 题目原文就一句话:Write a function to find the longest common prefix string amongst an array of strings. 题意是给一个字符串数组,找出这个字符串数组中全部字符串的最长公共 ...
分类:
其他好文 时间:
2017-07-02 16:18:04
阅读次数:
248
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 ...
分类:
其他好文 时间:
2017-07-02 10:24:30
阅读次数:
111
LeetCode 5_Longest Palindromic Substring 题目描写叙述: Given a string S, find the longest palindromic substring in S. You may assume that the maximum length ...
分类:
其他好文 时间:
2017-07-01 20:12:24
阅读次数:
162