摘要: Given a binary array, find the maximum number of consecutive 1s in this array. Example 1: Note: The input array will only contain 0 and 1. The length 阅读全文
posted @ 2017-03-06 13:26 CodesKiller 阅读(129) 评论(0) 推荐(0) 编辑
摘要: Given a non-empty array of integers, return the third maximum number in this array. If it does not exist, return the maximum number. The time complexi 阅读全文
posted @ 2017-03-06 13:19 CodesKiller 阅读(143) 评论(0) 推荐(0) 编辑
摘要: Given a collection of integers that might contain duplicates, nums, return all possible subsets. Note: The solution set must not contain duplicate sub 阅读全文
posted @ 2017-03-06 12:32 CodesKiller 阅读(99) 评论(0) 推荐(0) 编辑
摘要: Design a data structure that supports all following operations in average O(1) time. Note: Duplicate elements are allowed. Example: 阅读全文
posted @ 2017-03-06 11:56 CodesKiller 阅读(165) 评论(0) 推荐(0) 编辑
摘要: Design a data structure that supports all following operations in average O(1) time. Example: 阅读全文
posted @ 2017-03-06 09:46 CodesKiller 阅读(189) 评论(0) 推荐(0) 编辑
摘要: Given a string that consists of only uppercase English letters, you can replace any letter in the string with another letter at most k times. Find the 阅读全文
posted @ 2017-03-06 09:02 CodesKiller 阅读(141) 评论(0) 推荐(0) 编辑
摘要: Given a string, find the length of the longest substring T that contains at most k distinct characters. For example, Given s = “eceba” and k = 2, T is 阅读全文
posted @ 2017-03-06 08:08 CodesKiller 阅读(169) 评论(0) 推荐(0) 编辑
摘要: Given a string, find the length of the longest substring without repeating characters. Examples: Given "abcabcbb", the answer is "abc", which the leng 阅读全文
posted @ 2017-03-06 07:56 CodesKiller 阅读(151) 评论(0) 推荐(0) 编辑
摘要: Given a string, find the length of the longest substring T that contains at most 2 distinct characters. For example, Given s = “eceba”, T is "ece" whi 阅读全文
posted @ 2017-03-06 05:18 CodesKiller 阅读(152) 评论(0) 推荐(0) 编辑