摘要: 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)