摘要:
题目:Given two sorted integer arrays A and B, merge B into A as one sorted array.Note:You may assume that A has enough space (size that is greater or e... 阅读全文
摘要:
题目: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 = "ADOBE... 阅读全文
摘要:
题目:You are given a string, S, and a list of words, L, that are all of the same length. Find all starting indices of substring(s) in S that is a conca... 阅读全文
摘要:
题目:Given a set of non-overlapping intervals, insert a new interval into the intervals (merge if necessary).You may assume that the intervals were ini... 阅读全文
摘要:
题目:Given a collection of intervals, merge all overlapping intervals.For example,Given [1,3],[2,6],[8,10],[15,18],return [1,6],[8,10],[15,18].题解:这道题主要... 阅读全文
摘要:
题目:Given a string, find the length of the longest substring without repeating characters. For example, the longest substring without repeating letter... 阅读全文
摘要:
题目:Given a string s consists of upper/lower-case alphabets and empty space characters ' ', return the length of last word in the string.If the last w... 阅读全文
摘要:
题目:Given an array of non-negative integers, you are initially positioned at the first index of the array.Each element in the array represents your ma... 阅读全文
摘要:
题目:Given an array of non-negative integers, you are initially positioned at the first index of the array.Each element in the array represents your ma... 阅读全文
摘要:
题目:Write a function to find the longest common prefix string amongst an array of strings.题解:解题思路是,先对整个String数组预处理一下,求一个最小长度(最长前缀肯定不能大于最小长度)。然后以第0个字符串... 阅读全文
摘要:
题目:Given an array with n objects colored red, white or blue, sort them so that objects of the same color are adjacent, with the colors in the order r... 阅读全文