It's still an Amazon interview question. Given an array containing only stars '*' and hashes '#' . Find longest contiguous sub array that will cont...
分类:
其他好文 时间:
2014-09-09 21:20:49
阅读次数:
254
Palindrome Partitioning
Total Accepted: 18096 Total
Submissions: 69797My Submissions
Given a string s, partition s such that every substring of the partition is a palindrome.
Return all...
分类:
其他好文 时间:
2014-09-09 18:29:29
阅读次数:
205
在Java中我们无须关心内存的释放,JVM提供了内存管理机制,有垃圾回收器帮助回收不需要的对象。但实际中一些不当的使用仍然会导致一系列的内存问题,常见的就是内存泄漏和内存溢出
内存溢出(out of memory ):通俗的说就是内存不够用了,比如在一个无限循环中不断创建一个大的对象,很快就会引发内存溢出。
内存泄漏(leak of memory):是指为一个对象分配内存之后,在对象已经不在使...
分类:
编程语言 时间:
2014-09-09 16:09:59
阅读次数:
222
1、$position = index(string,substring,skipchars); 该函数返回子串substring在字符串string中的位置,如果不存在,则返回-1;参数skipchars是可选参数,表示查找之前跳过的字符数,即:从该位置处开始查找;2、rindex(string,...
分类:
其他好文 时间:
2014-09-09 15:46:08
阅读次数:
147
Longest Valid Parentheses
Total Accepted: 14818 Total
Submissions: 75749My Submissions
Given a string containing just the characters '(' and ')',
find the length of the longest valid (w...
分类:
其他好文 时间:
2014-09-09 13:18:18
阅读次数:
166
Longest Common Prefix
Total Accepted: 17298 Total
Submissions: 63704My Submissions
Write a function to find the longest common prefix string amongst an array of strings.
题意...
分类:
其他好文 时间:
2014-09-09 13:16:38
阅读次数:
135
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...
分类:
其他好文 时间:
2014-09-09 12:14:08
阅读次数:
200
Given a string, find the length of the longest substring without repeating characters. For example, the longest substring without repeating letters fo...
分类:
其他好文 时间:
2014-09-09 11:49:38
阅读次数:
167
Longest Consecutive Sequence
Total Accepted: 19169 Total
Submissions: 68303My Submissions
Given an unsorted array of integers, find the length of the longest consecutive elements sequence...
分类:
其他好文 时间:
2014-09-07 21:12:55
阅读次数:
294