摘要:
LeetCode: Gray CodeThe gray code is a binary numeral system where two successive values differ in only one bit.Given a non-negative integer n represen... 阅读全文
摘要:
LeetCode: Gray CodeThe gray code is a binary numeral system where two successive values differ in only one bit.Given a non-negative integer n represen... 阅读全文
摘要:
LeetCode: Decode WaysA message containing letters from A-Z is being encoded to numbers using the following mapping:'A' -> 1'B' -> 2...'Z' -> 26Given a... 阅读全文
摘要:
LeetCode: SubsetsGiven a set of distinct integers, S, return all possible subsets.Note:Elements in a subset must be in non-descending order.The soluti... 阅读全文
摘要:
LeetCode: Reverse Linked ListReverse a linked list from position m to n. Do it in-place and in one-pass. For example:Given 1->2->3->4->5->NULL, m = 2 ... 阅读全文
摘要:
LeetCode: Restore IP AddressesGiven a string containing only digits, restore it by returning all possible valid IP address combinations. For example:G... 阅读全文
摘要:
LeetCode: Binary Tree Inorder TraversalGiven a binary tree, return the inorder traversal of its nodes' values. For example:Given binary tree {1,#,2,3}... 阅读全文
摘要:
LeetCode: Unique Binary Search TreesGiven n, how many structurally unique BST's (binary search trees) that store values 1...n? For example,Given n = 3... 阅读全文
摘要:
LeetCode: Interleaving StringGiven s1, s2, s3, find whether s3 is formed by the interleaving of s1 and s2. For example,Given:s1 = "aabcc",s2 = "dbbca"... 阅读全文
摘要:
LeetCode: Validata Binary Search TreeGiven a binary tree, determine if it is a valid binary search tree (BST).Assume a BST is defined as follows:The l... 阅读全文
摘要:
LeetCode: Recover Binary Search TreeTwo elements of a binary search tree (BST) are swapped by mistake.Recover the tree without changing its structure.... 阅读全文
|