上一页 1 2 3 4 5 6 7 8 9 ··· 17 下一页
摘要: 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 阅读全文
posted @ 2017-03-12 17:03 wilderness 阅读(200) 评论(0) 推荐(0)
摘要: 判断一个物体从左上角到右下角有多少种走法 阅读全文
posted @ 2017-03-12 16:20 wilderness 阅读(116) 评论(0) 推荐(0)
摘要: Find 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,-1,2, 阅读全文
posted @ 2017-03-12 15:35 wilderness 阅读(167) 评论(0) 推荐(0)
摘要: There are N gas stations along a circular route, where the amount of gas at station i is gas[i]. You have a car with an unlimited gas tank and it cost 阅读全文
posted @ 2017-03-10 23:34 wilderness 阅读(178) 评论(0) 推荐(0)
摘要: Assume you are an awesome parent and want to give your children some cookies. But, you should give each child at most one cookie. Each child i has a g 阅读全文
posted @ 2017-03-10 22:32 wilderness 阅读(135) 评论(0) 推荐(0)
摘要: Given an array of non-negative integers, you are initially positioned at the first index of the array. Each element in the array represents your maxim 阅读全文
posted @ 2017-03-10 16:14 wilderness 阅读(154) 评论(0) 推荐(0)
摘要: Given an array of non-negative integers, you are initially positioned at the first index of the array. Each element in the array represents your maxim 阅读全文
posted @ 2017-03-10 13:25 wilderness 阅读(228) 评论(0) 推荐(0)
摘要: Given a binary tree, return the bottom-up level order traversal of its nodes' values. (ie, from left to right, level by level from leaf to root). For 阅读全文
posted @ 2017-03-09 22:47 wilderness 阅读(134) 评论(0) 推荐(0)
摘要: 求树的最大深度 1 line python 阅读全文
posted @ 2017-03-09 11:57 wilderness 阅读(108) 评论(0) 推荐(0)
摘要: Given a binary tree, return the zigzag level order traversal of its nodes' values. (ie, from left to right, then right to left for the next level and 阅读全文
posted @ 2017-03-09 11:48 wilderness 阅读(117) 评论(0) 推荐(0)
上一页 1 2 3 4 5 6 7 8 9 ··· 17 下一页