摘要: QuestionGivenn, how many structurally uniqueBST's(binary search trees) that store values 1...n?For example,Givenn= 3, there are a total of 5 unique BS... 阅读全文
posted @ 2015-09-20 07:46 树獭君 阅读(117) 评论(0) 推荐(0) 编辑
摘要: QuestionFollow up for "Unique Paths":Now consider if some obstacles are added to the grids. How many unique paths would there be?An obstacle and empty... 阅读全文
posted @ 2015-09-20 03:04 树獭君 阅读(120) 评论(0) 推荐(0) 编辑
摘要: QuestionA robot is located at the top-left corner of amxngrid (marked 'Start' in the diagram below).The robot can only move either down or right at an... 阅读全文
posted @ 2015-09-20 02:41 树獭君 阅读(136) 评论(0) 推荐(0) 编辑
摘要: QuestionFind the contiguous subarray within an array (containing at least one number) which has the largest sum.For example, given the array[−2,1,−3,4... 阅读全文
posted @ 2015-09-20 02:26 树獭君 阅读(158) 评论(0) 推荐(0) 编辑
摘要: QuestionYou 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 distinct ways can y... 阅读全文
posted @ 2015-09-19 23:46 树獭君 阅读(178) 评论(0) 推荐(0) 编辑
摘要: QuestionAfter robbing those houses on that street, the thief has found himself a new place for his thievery so that he will not get too much attention... 阅读全文
posted @ 2015-09-19 23:33 树獭君 阅读(146) 评论(0) 推荐(0) 编辑
摘要: QuestionYou are a professional robber planning to rob houses along a street. Each house has a certain amount of money stashed, the only constraint sto... 阅读全文
posted @ 2015-09-19 23:05 树獭君 阅读(187) 评论(0) 推荐(0) 编辑
摘要: QuestionGiven a string, determine if it is a palindrome, considering only alphanumeric characters and ignoring cases.For example,"A man, a plan, a can... 阅读全文
posted @ 2015-09-17 08:05 树獭君 阅读(161) 评论(0) 推荐(0) 编辑
摘要: QuestionGivennnon-negative integersa1,a2, ...,an, where each represents a point at coordinate (i,ai).nvertical lines are drawn such that the two endpo... 阅读全文
posted @ 2015-09-17 03:46 树獭君 阅读(133) 评论(0) 推荐(0) 编辑
摘要: QuestionGiven a sorted linked list, delete all nodes that have duplicate numbers, leaving onlydistinctnumbers from the original list.For example,Given... 阅读全文
posted @ 2015-09-16 22:59 树獭君 阅读(128) 评论(0) 推荐(0) 编辑