下午去蹭了一发新浪的笔试。炒鸡多的网络基础知识,总共18道题,就写了8道左右吧,剩下的全是网络知识,这部分抽时间至少过一过。其中一道算法题,回来跟嘟嘟商量,才发现是leetcode上的原题,连example都没有变,这可是道难度系数5的题,我嘞个去。题目:给定三个字符串s1,s2,s3,判断s3是否...
分类:
其他好文 时间:
2014-06-11 08:25:39
阅读次数:
241
Given a string, find the length of the longest substring without repeating characters. For example, the longest substring without
repeating letters for "abcabcbb" is "abc", which the length is 3. Fo...
分类:
其他好文 时间:
2014-06-08 16:27:47
阅读次数:
231
题目:For example, given s = "aab",
Return 1 since the palindrome partitioning ["aa","b"] could be produced using 1 cut
解题思路:给一个字符串,如果字符串可以划分成若干子回文字符串,返回最小的划分数量。
这个题如果还用之前求所有划分组合的循环加递归方法的话,就会得到超时的错误。这是就要考虑别的方法,动态规划倒是一个不错的方法,但是动态规划最重要的是要找到动态方程。本题的动态方程:
dp[i] =...
分类:
其他好文 时间:
2014-06-08 14:56:58
阅读次数:
257
题目
Given a string containing only digits, restore it by returning all possible valid IP address combinations.
For example:
Given "25525511135",
return ["255.255.11.135", "255.255.111.3...
分类:
其他好文 时间:
2014-06-08 10:37:47
阅读次数:
273
Given two integersnandk, return all possible
combinations ofknumbers out of 1 ...n.For example,Ifn= 4 andk= 2, a solution
is:[ [2,4], [3,4], [2,3],...
分类:
其他好文 时间:
2014-06-08 08:08:29
阅读次数:
294
USE [master]GOALTER DATABASE DNName SET RECOVERY
SIMPLE WITH NO_WAITGOALTER DATABASE DNName SET RECOVERY SIMPLE --简单模式GOUSE
DNNameGODBCC SHRINKFILE (N...
分类:
数据库 时间:
2014-06-08 07:15:39
阅读次数:
189
In this tutorial, we show you how to create a
simple “hello world”Androidproject inEclipse IDE + ADT plugin, and run it
withAndroid Virtual Device (AV...
分类:
移动开发 时间:
2014-06-08 06:43:46
阅读次数:
403
Spiral MatrixGiven a matrix of m x n elements
(m rows, n columns), return all elements of the matrix in spiral order.For
example, Given the following ...
分类:
其他好文 时间:
2014-06-07 22:57:31
阅读次数:
236
SAX是Simple API for
XML的缩写,它并不是由W3C官方所提出的标准。SAX是一种轻量型的方法,不像DOM解析时,把XML文档全部载入内存中,在PC上操作,Dom还有
优势,但在手机中端上则无优势,因为手机内存和硬件都比不上PC强。使用 SAX 是比较安全的,并且 Android 提...
分类:
其他好文 时间:
2014-06-07 21:07:11
阅读次数:
332
Given a linked list, remove thenthnode from the
end of list and return its head.For example, Given linked list:
1->2->3->4->5, and n = 2. After re...
分类:
其他好文 时间:
2014-06-07 16:54:26
阅读次数:
221