上一页 1 ··· 8 9 10 11 12 13 14 15 16 ··· 20 下一页

[LeetCode] Valid Sudoku 解题报告

摘要: Determine if a Sudoku is valid, according to: Sudoku Puzzles - The Rules.The Sudoku board could be partially filled, where empty cells are filled with... 阅读全文
posted @ 2013-01-12 14:20 小刀初试 阅读(152) 评论(0) 推荐(0)

[LeetCode] Valid Parentheses 解题报告

摘要: Given a string containing just the characters '(', ')', '{', '}', '[' and ']', determine if the input string is valid.The brackets must close in the c... 阅读全文
posted @ 2013-01-12 13:31 小刀初试 阅读(153) 评论(0) 推荐(0)

[LeetCode] Unique Paths II 解题报告

摘要: 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 @ 2013-01-11 14:18 小刀初试 阅读(156) 评论(0) 推荐(0)

[LeetCode] Unique Paths 解题报告

摘要: Ranking: **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 righ... 阅读全文
posted @ 2013-01-11 13:23 小刀初试 阅读(153) 评论(0) 推荐(0)

[LeetCode] Triangle 解题报告

摘要: 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 @ 2013-01-10 15:46 小刀初试 阅读(171) 评论(0) 推荐(0)

[LeetCode] Trapping Rain Water 解题报告

摘要: Given n non-negative integers representing an elevation map where the width of each bar is 1, compute how much water it is able to trap after raining.... 阅读全文
posted @ 2013-01-10 14:36 小刀初试 阅读(158) 评论(0) 推荐(0)

[LeetCode] Text Justification 解题报告

摘要: Given an array of words and a length L, format the text such that each line has exactly L characters and is fully (left and right) justified.You shoul... 阅读全文
posted @ 2013-01-09 15:18 小刀初试 阅读(182) 评论(0) 推荐(0)

[LeetCode] Symmetric Tree 解题报告

摘要: Given a binary tree, check whether it is a mirror of itself (ie, symmetric around its center).For example, this binary tree is symmetric: 1 / \ ... 阅读全文
posted @ 2013-01-08 12:40 小刀初试 阅读(248) 评论(0) 推荐(0)

[LeetCode] Swap Nodes in Pairs 解题报告

摘要: Given a linked list, swap every two adjacent nodes and return its head.For example,Given 1->2->3->4, you should return the list as 2->1->4->3.Your alg... 阅读全文
posted @ 2013-01-08 12:22 小刀初试 阅读(142) 评论(0) 推荐(0)

[LeetCode] Substring with Concatenation of All Words 解题报告

摘要: You are given a string, S, and a list of words, L, that are all of the same length. Find all starting indices of substring(s) in S that is a concatena... 阅读全文
posted @ 2013-01-08 11:59 小刀初试 阅读(212) 评论(0) 推荐(0)
上一页 1 ··· 8 9 10 11 12 13 14 15 16 ··· 20 下一页