摘要: 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 ... 阅读全文
posted @ 2015-08-20 14:58 cnblogshnj 阅读(142) 评论(0) 推荐(0) 编辑
摘要: 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... 阅读全文
posted @ 2015-08-20 13:17 cnblogshnj 阅读(113) 评论(0) 推荐(0) 编辑
摘要: leetcode - Maximum SubarrayFind the contiguous subarray within an array (containing at least one number) which has the largest sum.For example, given ... 阅读全文
posted @ 2015-08-20 11:46 cnblogshnj 阅读(115) 评论(0) 推荐(0) 编辑
摘要: leetcode -Unique Binary Search TreesGivenn, how many structurally uniqueBST's(binary search trees) that store values 1...n?For example,Givenn= 3, ther... 阅读全文
posted @ 2015-08-20 11:23 cnblogshnj 阅读(112) 评论(0) 推荐(0) 编辑
摘要: leetcode -Best Time to Buy and Sell Stock IIISay you have an array for which theithelement is the price of a given stock on dayi.Design an algorithm t... 阅读全文
posted @ 2015-08-19 17:14 cnblogshnj 阅读(151) 评论(0) 推荐(0) 编辑
摘要: leetcode -Best Time to Buy and Sell StockSay you have an array for which theithelement is the price of a given stock on dayi.If you were only permitte... 阅读全文
posted @ 2015-08-19 10:22 cnblogshnj 阅读(112) 评论(0) 推荐(0) 编辑
摘要: leetcode -Best Time to Buy and Sell Stock IISay you have an array for which theithelement is the price of a given stock on dayi.Design an algorithm to... 阅读全文
posted @ 2015-08-18 23:34 cnblogshnj 阅读(101) 评论(0) 推荐(0) 编辑
摘要: leetcode -Same TreeGiven two binary trees, write a function to check if they are equal or not.Two binary trees are considered equal if they are struct... 阅读全文
posted @ 2015-08-18 23:16 cnblogshnj 阅读(111) 评论(0) 推荐(0) 编辑
摘要: leetcode -Minimum Depth of Binary TreeGiven a binary tree, find its minimum depth.The minimum depth is the number of nodes along the shortest path fro... 阅读全文
posted @ 2015-08-18 23:10 cnblogshnj 阅读(113) 评论(0) 推荐(0) 编辑
摘要: leetcode -Maximum Depth of Binary TreeGiven a binary tree, find its maximum depth.The maximum depth is the number of nodes along the longest path from... 阅读全文
posted @ 2015-08-18 17:49 cnblogshnj 阅读(76) 评论(0) 推荐(0) 编辑