上一页 1 ··· 4 5 6 7 8 9 10 11 12 ··· 21 下一页
Given an absolute path for a file (Unix-style), simplify it.For example, path = "/home/", => "/home" path = "/a/./b/../../c/", => "/c"Corner Cases:Did... Read More
posted @ 2014-08-18 16:54 Xylophone Views(143) Comments(0) Diggs(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... Read More
posted @ 2014-08-18 11:20 Xylophone Views(182) Comments(0) Diggs(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... Read More
posted @ 2014-08-16 21:51 Xylophone Views(230) Comments(0) Diggs(0)
Given a set of distinct integers, S, return all possible subsets.Note:Elements in a subset must be in non-descending order.The solution set must not c... Read More
posted @ 2014-08-15 15:59 Xylophone Views(465) Comments(0) Diggs(0)
Given a 2D binary matrix filled with 0's and 1's, find the largest rectangle containing all ones and return its area.参考“Largest Rectangle in Histogram... Read More
posted @ 2014-08-15 11:39 Xylophone Views(148) Comments(0) Diggs(0)
Given two integers n and k, return all possible combinations of k numbers out of 1 ... n.For example, If n = 4 and k = 2, a solution is:[ [2,4], [3,... Read More
posted @ 2014-08-14 18:04 Xylophone Views(231) Comments(0) Diggs(0)
Implement wildcard pattern matching with support for '?' and '*'.'?' Matches any single character.'*' Matches any sequence of characters (including th... Read More
posted @ 2014-08-14 16:00 Xylophone Views(195) Comments(0) Diggs(0)
Given a sorted linked list, delete all nodes that have duplicate numbers, leaving only distinct numbers from the original list.For example, Given 1->2... Read More
posted @ 2014-08-13 22:57 Xylophone Views(127) Comments(0) Diggs(0)
Given a linked list and a value x, partition it such that all nodes less than x come before nodes greater than or equal to x.You should preserve the o... Read More
posted @ 2014-08-13 21:28 Xylophone Views(121) Comments(0) Diggs(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... Read More
posted @ 2014-08-13 21:03 Xylophone Views(223) Comments(0) Diggs(0)
上一页 1 ··· 4 5 6 7 8 9 10 11 12 ··· 21 下一页