摘要:
leetcode -Invert Binary Treenvert a binary tree. 4 / \ 2 7 / \ / \1 3 6 9to 4 / \ 7 2 / \ / \9 6 3 1/** * Defini... 阅读全文
摘要:
leetcode - Lowest Common Ancestor of a Binary Search TreeGiven a binary search tree (BST), find the lowest common ancestor (LCA) of two given nodes in... 阅读全文
摘要:
leetcode -Minimum Path SumGiven amxngrid filled with non-negative numbers, find a path from top left to bottom right whichminimizesthe sum of all numb... 阅读全文
摘要:
leetcode -Unique PathsA robot is located at the top-left corner of amxngrid (marked 'Start' in the diagram below).The robot can only move either down ... 阅读全文
摘要:
leetcode -Climbing StairsYou are climbing a stair case. It takesnsteps to reach to the top.Each time you can either climb 1 or 2 steps. In how many di... 阅读全文
摘要:
leetcode - Maximum SubarrayFind the contiguous subarray within an array (containing at least one number) which has the largest sum.For example, given ... 阅读全文
摘要:
leetcode -Unique Binary Search TreesGivenn, how many structurally uniqueBST's(binary search trees) that store values 1...n?For example,Givenn= 3, ther... 阅读全文