摘要:
The set [1,2,3,…,n] contains a total of n! unique permutations.By listing and labeling all of the permutations in order,We get the following sequence ... 阅读全文
摘要:
Implement strStr().Returns a pointer to the first occurrence of needle in haystack, or null if needle is not part of haystack.此题我觉得并不是真要你写出kmp算法。 指针暴力... 阅读全文
摘要:
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 Hist... 阅读全文
摘要:
Given n non-negative integers representing the histogram's bar height where the width of each bar is 1, find the area of largest rectangle in the hist... 阅读全文
摘要:
Given a string S, find the longest palindromic substring in S. You may assume that the maximum length of S is 1000, and there exists one unique longes... 阅读全文
摘要:
Given s1, s2, s3, find whether s3 is formed by the interleaving of s1 and s2.For example,Given:s1 = "aabcc",s2 = "dbbca",When s3 = "aadbbcbcac", retur... 阅读全文
摘要:
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 = "ADOBECODE... 阅读全文
摘要:
A message containing letters from A-Z is being encoded to numbers using the following mapping:'A' -> 1'B' -> 2...'Z' -> 26Given an encoded message con... 阅读全文
摘要:
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 concatena... 阅读全文
摘要:
Given an array of words and a length L, format the text such that each line has exactly L characters and is fully (left and right) justified.You shoul... 阅读全文