Problem Description:Say you have an array for which theithelement is the price of a given stock on dayi.Design an algorithm to find the maximum profit...
分类:
其他好文 时间:
2014-07-07 16:05:24
阅读次数:
229
Problem Description:Given an array of integers, every element appearstwiceexcept for one. Find that single one.Solution: 1 public int singleNumber(int...
分类:
其他好文 时间:
2014-07-07 16:04:12
阅读次数:
178
Problem Description:Given a binary tree, find the maximum path sum.The path may start and end at any node in the tree.For example:Given the below bina...
分类:
其他好文 时间:
2014-07-07 15:57:05
阅读次数:
252
Problem Description:Given an unsorted array of integers, find the length of the longest consecutive elements sequence.For example,Given[100, 4, 200, 1...
分类:
其他好文 时间:
2014-07-07 15:54:24
阅读次数:
193
Given a string containing just the characters'('and')', find the length of the longest valid (well-formed) parentheses substring.For"(()", the longest...
分类:
其他好文 时间:
2014-07-07 15:34:56
阅读次数:
160
1.压缩命令: 命令格式:tar -zcvf 压缩文件名.tar.gz 被压缩文件名 可先切换到当前目录下。压缩文件名和被压缩文件名都可加入路径。2.解压缩命令: 命令格式:tar -zxvf 压缩文件名.tar.gz 解压缩后的文件只能放在当前的目录。3.文件查找命令查找目录:find /(...
分类:
系统相关 时间:
2014-07-07 15:33:40
阅读次数:
254
Problem Description:Given a triangle, find the minimum path sum from top to bottom. Each step you may move to adjacent numbers on the row below.For ex...
分类:
其他好文 时间:
2014-07-07 15:29:11
阅读次数:
280
Problem Description:Say you have an array for which theithelement is the price of a given stock on dayi.Design an algorithm to find the maximum profit...
分类:
其他好文 时间:
2014-07-07 15:24:41
阅读次数:
212
Given a string S and a string T, find the minimum window in S which will contain all the characters in T in complexity O(n).
Givens1,s2,s3, find whethers3is formed by the interleaving ofs1ands2.For example,Given:s1="aabcc",s2="dbbca",Whens3="aadbbcbcac", return true.Whens3="...
分类:
其他好文 时间:
2014-07-07 14:12:24
阅读次数:
204