摘要:
题目: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 seque... 阅读全文
摘要:
题目: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 ... 阅读全文
摘要:
题目:Given two words word1 and word2, find the minimum number of steps required to convert word1 to word2. (each operation is counted as 1 step.)You ha... 阅读全文
摘要:
题目:Given a string s1, we may represent it as a binary tree by partitioning it to two non-empty substrings recursively.Below is one possible represent... 阅读全文
摘要:
题目: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... 阅读全文
摘要:
题目: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", r... 阅读全文
摘要:
题目:Given a string S and a string T, count the number of distinct subsequences of T in S.A subsequence of a string is a new string which is formed fro... 阅读全文
摘要:
题目:Given n points on a 2D plane, find the maximum number of points that lie on the same straight line.题解:这道题就是给你一个2D平面,然后给你的数据结构是由横纵坐标表示的点,然后看哪条直线上的点... 阅读全文