上一页 1 ··· 13 14 15 16 17 18 19 20 21 ··· 29 下一页
摘要: 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 @ 2015-10-22 19:36 eversliver 阅读(347) 评论(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 @ 2015-10-22 16:37 eversliver 阅读(299) 评论(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 @ 2015-10-22 15:47 eversliver 阅读(330) 评论(0) 推荐(0) 编辑
摘要: 在往上看到这样的题目:大体的有如下几个思路: 1一个栈维护队列的内容,当入队列的操作的时候就直接入s1栈,当出队列的时候就现将s1栈底以外的内容都push到s2中保存起来,将s1栈底返回后将s2内容在弹回来。 2 s1作为压栈之用,s2作为出栈之用。入队列的时候就直接检查s1中有无对象,没有检查... 阅读全文
posted @ 2015-10-22 14:54 eversliver 阅读(685) 评论(0) 推荐(0) 编辑
摘要: Given a stringsconsists of upper/lower-case alphabets and empty space characters' ', return the length of last word in the string.If the last word doe... 阅读全文
posted @ 2015-10-22 10:13 eversliver 阅读(265) 评论(0) 推荐(0) 编辑
摘要: Implement a basic calculator to evaluate a simple expression string.The expression string may contain open(and closing parentheses), the plus+or minus... 阅读全文
posted @ 2015-10-21 22:22 eversliver 阅读(547) 评论(0) 推荐(0) 编辑
摘要: Given a binary tree, return thepreordertraversal of its nodes' values.For example:Given binary tree{1,#,2,3} 1 \ 2 / 3return[1,2,3].前序遍历二叉... 阅读全文
posted @ 2015-10-21 20:04 eversliver 阅读(287) 评论(0) 推荐(0) 编辑
摘要: Given a sorted integer array without duplicates, return the summary of its ranges.For example, given[0,1,2,4,5,7], return["0->2","4->5","7"].就是概括区间的方式... 阅读全文
posted @ 2015-10-21 19:08 eversliver 阅读(209) 评论(0) 推荐(0) 编辑
摘要: Given a set of distinct integers,nums, return all possible subsets.Note:Elements in a subset must be in non-descending order.The solution set must not... 阅读全文
posted @ 2015-10-21 09:19 eversliver 阅读(271) 评论(0) 推荐(0) 编辑
摘要: Given a collection of integers that might contain duplicates,nums, return all possible subsets.Note:Elements in a subset must be in non-descending ord... 阅读全文
posted @ 2015-10-20 21:12 eversliver 阅读(255) 评论(0) 推荐(0) 编辑
上一页 1 ··· 13 14 15 16 17 18 19 20 21 ··· 29 下一页