摘要:
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... 阅读全文
摘要:
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... 阅读全文
摘要:
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 ... 阅读全文
摘要:
在往上看到这样的题目:大体的有如下几个思路: 1一个栈维护队列的内容,当入队列的操作的时候就直接入s1栈,当出队列的时候就现将s1栈底以外的内容都push到s2中保存起来,将s1栈底返回后将s2内容在弹回来。 2 s1作为压栈之用,s2作为出栈之用。入队列的时候就直接检查s1中有无对象,没有检查... 阅读全文
摘要:
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... 阅读全文