上一页 1 ··· 63 64 65 66 67 68 69 70 71 ··· 98 下一页
摘要: 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). Example: Input: S = "ADOB 阅读全文
posted @ 2018-10-23 22:17 Veritas_des_Liberty 阅读(241) 评论(0) 推荐(0)
摘要: Given an array with n objects colored red, white or blue, sort them in-place so that objects of the same color are adjacent, with the colors in the or 阅读全文
posted @ 2018-10-23 21:20 Veritas_des_Liberty 阅读(177) 评论(0) 推荐(0)
摘要: Write an efficient algorithm that searches for a value in an m x n matrix. This matrix has the following properties: Integers in each row are sorted f 阅读全文
posted @ 2018-10-23 21:09 Veritas_des_Liberty 阅读(183) 评论(0) 推荐(0)
摘要: Given a m x n matrix, if an element is 0, set its entire row and column to 0. Do it in-place. Example 1: Input: [ [1,1,1], [1,0,1], [1,1,1] ] Output: 阅读全文
posted @ 2018-10-23 20:39 Veritas_des_Liberty 阅读(179) 评论(0) 推荐(0)
摘要: Given two words word1 and word2, find the minimum number of operations required to convert word1 to word2. You have the following 3 operations permitt 阅读全文
posted @ 2018-10-22 22:23 Veritas_des_Liberty 阅读(174) 评论(0) 推荐(0)
摘要: Given an absolute path for a file (Unix-style), simplify it. For example,path = "/home/", => "/home"path = "/a/./b/../../c/", => "/c"path = "/a/../../ 阅读全文
posted @ 2018-10-22 21:37 Veritas_des_Liberty 阅读(215) 评论(0) 推荐(0)
摘要: You are climbing a stair case. It takes n steps to reach to the top. Each time you can either climb 1 or 2 steps. In how many distinct ways can you cl 阅读全文
posted @ 2018-10-22 18:47 Veritas_des_Liberty 阅读(183) 评论(0) 推荐(0)
摘要: Implement int sqrt(int x). Compute and return the square root of x, where x is guaranteed to be a non-negative integer. Since the return type is an in 阅读全文
posted @ 2018-10-22 18:30 Veritas_des_Liberty 阅读(246) 评论(0) 推荐(0)
摘要: Given an array of words and a width maxWidth, format the text such that each line has exactly maxWidth characters and is fully (left and right) justif 阅读全文
posted @ 2018-10-22 18:10 Veritas_des_Liberty 阅读(160) 评论(0) 推荐(0)
摘要: Validate if a given string can be interpreted as a decimal number. Some examples:"0" => true" 0.1 " => true"abc" => false"1 a" => false"2e10" => true" 阅读全文
posted @ 2018-10-21 19:27 Veritas_des_Liberty 阅读(209) 评论(0) 推荐(0)
上一页 1 ··· 63 64 65 66 67 68 69 70 71 ··· 98 下一页