摘要:
Given a triangle, find the minimum path sum from top to bottom. Each step you may move to adjacent numbers on the row below.For example, given the fol... 阅读全文
posted @ 2014-11-06 15:00
li303491
阅读(115)
评论(0)
推荐(0)
摘要:
Follow 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 space i... 阅读全文
posted @ 2014-11-06 14:53
li303491
阅读(97)
评论(0)
推荐(0)
摘要:
A 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 any point ... 阅读全文
posted @ 2014-11-06 14:52
li303491
阅读(121)
评论(0)
推荐(0)
摘要:
Given an indexk, return thekthrow of the Pascal's triangle.For example, givenk= 3,Return[1,3,3,1].Note:Could you optimize your algorithm to use onlyO(... 阅读全文
posted @ 2014-11-06 14:51
li303491
阅读(94)
评论(0)
推荐(0)
摘要:
GivennumRows, generate the firstnumRowsof Pascal's triangle.For example, givennumRows= 5,Return[ [1], [1,1], [1,2,1], [1,3,3,1], [1,4,6,4,1]... 阅读全文
posted @ 2014-11-06 14:45
li303491
阅读(108)
评论(0)
推荐(0)
摘要:
Given a non-negative number represented as an array of digits, plus one to the number.The digits are stored such that the most significant digit is at... 阅读全文
posted @ 2014-11-06 14:44
li303491
阅读(94)
评论(0)
推荐(0)
摘要:
Follow up for "Remove Duplicates":What if duplicates are allowed at mosttwice?For example,Given sorted array A =[1,1,1,2,2,3],Your function should ret... 阅读全文
posted @ 2014-11-06 14:40
li303491
阅读(95)
评论(0)
推荐(0)
摘要:
Given a sorted array, remove the duplicates in place such that each element appear onlyonceand return the new length.Do not allocate extra space for a... 阅读全文
posted @ 2014-11-06 14:38
li303491
阅读(119)
评论(0)
推荐(0)
摘要:
Given an array and a value, remove all instances of that value in place and return the new length.The order of elements can be changed. It doesn't mat... 阅读全文
posted @ 2014-11-06 13:57
li303491
阅读(84)
评论(0)
推荐(0)

浙公网安备 33010602011771号