码迷,mamicode.com
首页 >  
搜索关键字:turn the corner    ( 27676个结果
Leetcode: Unique Paths
题目: A robot is located at the top-left corner of a m x n grid (marked 'Start' in the diagram below). The robot can only move either down or right at any point in time. The robot is trying to rea...
分类:其他好文   时间:2015-04-10 01:22:35    阅读次数:239
Simplify Path -- leetcode
Given an absolute path for a file (Unix-style), simplify it. For example, path = "/home/", => "/home" path = "/a/./b/../../c/", => "/c" click to show corner cases. Corner Cases: Did ...
分类:其他好文   时间:2015-04-09 17:39:26    阅读次数:134
174. Dungeon Game
The demons had captured the princess (P) and imprisoned her in the bottom-right corner of a dungeon. The dungeon consists of M x N rooms laid out in a...
分类:其他好文   时间:2015-04-09 13:23:32    阅读次数:82
leetcode || 71、Simplify Path
problem: Given an absolute path for a file (Unix-style), simplify it. For example, path = "/home/", => "/home" path = "/a/./b/../../c/", => "/c" click to show corner cases. Corner ...
分类:其他好文   时间:2015-04-09 10:39:36    阅读次数:106
LeetCode Unique Paths
题目如下: 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....
分类:其他好文   时间:2015-04-08 21:30:16    阅读次数:111
HDU 3980 Paint Chain(SG函数)
Problem Description: Aekdycoin and abcdxyzk are playing a game. They get a circle chain with some beads. Initially none of the beads is painted. They take turns to paint the chain. In Each turn one p...
分类:其他好文   时间:2015-04-08 18:14:42    阅读次数:175
LeetCode: Unique Paths 解题报告
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 ...
分类:其他好文   时间:2015-04-08 06:28:43    阅读次数:86
Dungeon Game
The demons had captured the princess (P) and imprisoned her in the bottom-right corner of a dungeon. The dungeon consists of M x N rooms laid out in a 2D grid. Our valiant knight (K) was initially p...
分类:其他好文   时间:2015-04-07 21:44:54    阅读次数:139
String to Integer (atoi)--LeetCode
这种题的考察重点并不在于问题本身,而是要注意corner case的处理,整数一般有两点,一个是正负符号问题,另一个是整数越界问题。思路比较简单,就是先去掉多余的空格字符,然后读符号(注意正负号都有可能,也有可能没有符号),接下来按顺序读数字,结束条件有三种情况:(1)异常字符出现(按照C语言的标准是把异常字符起的后面全部截去,保留前面的部分作为结果);(2)数字越界(返回最接近的整数);(3)字...
分类:其他好文   时间:2015-04-06 17:22:19    阅读次数:137
LeetCode 62/63/120 Unique PathsI/II Triangle--DP
一:unique Path 题目: A robot is located at the top-left corner of a m x n grid (marked 'Start' in the diagram below). The robot can only move either down or right at any point in time. The robot i...
分类:其他好文   时间:2015-04-06 17:21:59    阅读次数:251
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!