LeetCode Delete Node In A Linked List DescriptionWrite a function to delete a node (except the tail) in a singly linked list, given only access to that node. Supposed the linked list is 1 -> 2 -> 3 -> 4 and you are given the thir 7月 16 2015 #leetcode
LeetCode Lowest Common Ancestor of a Binary Search Tree DescriptionGiven a binary search tree (BST), find the lowest common ancestor (LCA) of two given nodes in the BST. According to the definition of LCA on Wikipedia: “The lowest common ancestor is define 7月 14 2015 #leetcode
LeetCode Minimum Path Sum DescriptionGiven a m x n grid filled with non-negative numbers, find a path from top left to bottom right which minimizes the sum of all numbers along its path. Note: You can only move either down or 7月 14 2015 #leetcode
LeetCode Gray Code DescriptionThe gray code is a binary numeral system where two successive values differ in only one bit. Given a non-negative integer n representing the total number of bits in the code, print the sequ 7月 14 2015 #leetcode
LeetCode Binary Search Tree Iterator DescriptionImplement an iterator over a binary search tree (BST). Your iterator will be initialized with the root node of a BST. Calling next() will return the next smallest number in the BST. Note: n 7月 14 2015 #leetcode
LeetCode Flatten Binary Tree To Linked List DescriptionGiven a binary tree, flatten it to a linked list in-place. For example,Given 1 / \ 2 5 / \ \ 3 4 6 The flattened tree should look like: 1 \ 2 \ 7月 14 2015 #leetcode
LeetCode Binary Tree Zigzag Level Order Traversal DescriptionGiven a binary tree, return the zigzag level order traversal of its nodes’ values. (ie, from left to right, then right to left for the next level and alternate between). For example:Given b 7月 14 2015 #leetcode
LeetCode Convert Sorted List to Binary Search Tree DescriptionGiven a singly linked list where elements are sorted in ascending order, convert it to a height balanced BST. The original problem is here. The original code is here. 7月 14 2015 #leetcode
LeetCode Binary Tree Postorder Traversal DescriptionGiven a binary tree, return the postorder traversal of its nodes’ values. For example:Given binary tree {1,#,2,3}, 1 \ 2 / 3 return [3,2,1]. The original problem is here 7月 13 2015 #leetcode
LeetCode Sort List DescriptionSort a linked list in O(n log n) time using constant space complexity. The original problem is here. The original code is here. 7月 13 2015 #leetcode