原创 leetcode_120. Triangle

題目: Given a triangle, find the minimum path sum from top to bottom. Each step you may move to adjacent numbers on the

原创 leetcode_72. Edit Distance

題目: Given two words word1 and word2, find the minimum number of steps required to convert word1 to word2. (each operat

原创 leetcode_153. Find Minimum in Rotated Sorted Array

題目: Suppose an array sorted in ascending order is rotated at some pivot unknown to you beforehand. (i.e., 0 1 2 4 5 6

原创 leetcode_96. Unique Binary Search Trees

題目: Given n, how many structurally unique BST's (binary search trees) that store values 1...n? For example, Given n =

原创 leetcode_sicily

做了幾道模擬題。 第一道,遞歸。 簡單,不必多說。直接貼代碼: int F(int k, int n) { int m = 0; if(k == 0){ return n; } else{

原创 leetcode_110. Balanced Binary Tree

題目: Given a binary tree, determine if it is height-balanced. For this problem, a height-balanced binary tree is defi

原创 leetcode_112. Path Sum

Given a binary tree and a sum, determine if the tree has a root-to-leaf path such that adding up all the values along

原创 leetcode_63. Unique Paths II

題目: Follow up for "Unique Paths": Now consider if some obstacles are added to the grids. How many unique paths would t