上一页 1 ··· 25 26 27 28 29 30 31 32 33 ··· 36 下一页
摘要: Say you have an array for which the ith element is the price of a given stock on day i.Design an algorithm to find the maximum profit. You may complet... 阅读全文
posted @ 2014-11-25 12:54 LiBlog 阅读(132) 评论(0) 推荐(0) 编辑
摘要: Validate if a given string is numeric. Some examples:"0" => true" 0.1 " => true"abc" => false"1 a" => false"2e10" => trueNote: It is intended for t... 阅读全文
posted @ 2014-11-25 11:56 LiBlog 阅读(132) 评论(0) 推荐(0) 编辑
摘要: Given an array of words and a length L, format the text such that each line has exactly L characters and is fully (left and right) justified.You shoul... 阅读全文
posted @ 2014-11-25 10:51 LiBlog 阅读(247) 评论(0) 推荐(0) 编辑
摘要: Given two words word1 and word2, find the minimum number of steps required to convert word1 to word2. (each operation is counted as 1 step.)You have t... 阅读全文
posted @ 2014-11-25 10:11 LiBlog 阅读(111) 评论(0) 推荐(0) 编辑
摘要: 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). For example,S = "ADOBECOD... 阅读全文
posted @ 2014-11-24 08:04 LiBlog 阅读(127) 评论(0) 推荐(0) 编辑
摘要: Given a 2D binary matrix filled with 0's and 1's, find the largest rectangle containing all ones and return its area.Analysis:For each position (i,j),... 阅读全文
posted @ 2014-11-24 06:07 LiBlog 阅读(180) 评论(0) 推荐(0) 编辑
摘要: Given a string s1, we may represent it as a binary tree by partitioning it to two non-empty substrings recursively.Below is one possible representatio... 阅读全文
posted @ 2014-11-24 05:24 LiBlog 阅读(198) 评论(0) 推荐(0) 编辑
摘要: Given s1, s2, s3, find whether s3 is formed by the interleaving of s1 and s2. For example,Given:s1 = "aabcc",s2 = "dbbca",When s3 = "aadbbcbcac", retu... 阅读全文
posted @ 2014-11-24 04:49 LiBlog 阅读(190) 评论(0) 推荐(0) 编辑
摘要: Given an unsorted array of integers, find the length of the longest consecutive elements sequence. For example,Given [100, 4, 200, 1, 3, 2],The longes... 阅读全文
posted @ 2014-11-23 23:57 LiBlog 阅读(111) 评论(0) 推荐(0) 编辑
摘要: Merge k sorted linked lists and return it as one sorted list. Analyze and describe its complexity. Have you met this question in a real interview? Ana 阅读全文
posted @ 2014-11-22 04:54 LiBlog 阅读(130) 评论(0) 推荐(0) 编辑
上一页 1 ··· 25 26 27 28 29 30 31 32 33 ··· 36 下一页