摘要:
Problem : Given a string containing only digits, restore it by returning all possible valid IP address combinations. Example: 思路 : 首先弄清楚IP地址的定义。 Defin 阅读全文
摘要:
Problem : Given a collection of integers that might contain duplicates, nums , return all possible subsets (the power set). Note: The solution set mus 阅读全文
摘要:
Problem : The gray code is a binary numeral system where two successive values differ in only one bit. Given a non negative integer n representing the 阅读全文
摘要:
Problem : Given a linked list and a value x, partition it such that all nodes less than x come before nodes greater than or equal to x. You should pre 阅读全文
摘要:
Problem : Given a sorted linked list, delete all nodes that have duplicate numbers, leaving only distinct numbers from the original list. Example 1: E 阅读全文
摘要:
Problem : Given a sorted array nums, remove the duplicates in place such that duplicates appeared at most twice and return the new length. Do not allo 阅读全文
摘要:
Problem : Given a set of distinct integers, nums , return all possible subsets (the power set). Note: The solution set must not contain duplicate subs 阅读全文
摘要:
Problem : Given two integers n and k, return all possible combinations of k numbers out of 1 ... n. Example: 思路 : 这题的思路很难直接用语言表述,建议看代码,然后再纸上将其每一步运行的结果 阅读全文
摘要:
Problem : 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 阅读全文
摘要:
Problem : 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 ar 阅读全文