上一页 1 2 3 4 5 6 7 8 ··· 11 下一页
摘要: Search a 2D MatrixWrite an efficient algorithm that searches for a value in anmxnmatrix. This matrix has the following properties:Integers in each row... 阅读全文
posted @ 2015-09-13 20:28 Sean_le 阅读(125) 评论(0) 推荐(0) 编辑
摘要: Trapping Rain WaterGivennnon-negative integers representing an elevation map where the width of each bar is 1, compute how much water it is able to tr... 阅读全文
posted @ 2015-09-13 17:01 Sean_le 阅读(157) 评论(0) 推荐(0) 编辑
摘要: Container With Most WaterGivennnon-negative integersa1,a2, ...,an, where each represents a point at coordinate (i,ai).nvertical lines are drawn such t... 阅读全文
posted @ 2015-09-11 18:14 Sean_le 阅读(149) 评论(0) 推荐(0) 编辑
摘要: Permutations Given a collection of numbers, return all possible permutations. For example,[1,2,3] have the following permutations:[1,2,3], [1,3,2], [2 阅读全文
posted @ 2015-09-10 15:45 Sean_le 阅读(130) 评论(0) 推荐(0) 编辑
摘要: Missing NumberGiven an array containingndistinct numbers taken from0, 1, 2, ..., n, find the one that is missing from the array.For example,Givennums=... 阅读全文
posted @ 2015-09-10 15:08 Sean_le 阅读(99) 评论(0) 推荐(0) 编辑
摘要: Set Matrix ZeroesGiven amxnmatrix, if an element is 0, set its entire row and column to 0. Do it in place.空间复杂度O(1),不能使用额外的空间,那得多重复几次。判断第一行和第一列是否有0,用于... 阅读全文
posted @ 2015-09-10 11:26 Sean_le 阅读(146) 评论(0) 推荐(0) 编辑
摘要: Find Peak ElementA peak element is an element that is greater than its neighbors.Given an input array wherenum[i] ≠ num[i+1], find a peak element and ... 阅读全文
posted @ 2015-09-09 23:16 Sean_le 阅读(96) 评论(0) 推荐(0) 编辑
摘要: Balanced Binary TreeGiven a binary tree, determine if it is height-balanced.For this problem, a height-balanced binary tree is defined as a binary tre... 阅读全文
posted @ 2015-09-09 23:01 Sean_le 阅读(110) 评论(0) 推荐(0) 编辑
摘要: Spiral Matrix IIGiven an integern, generate a square matrix filled with elements from 1 ton2in spiral order.For example,Givenn=3,You should return the... 阅读全文
posted @ 2015-09-09 22:39 Sean_le 阅读(105) 评论(0) 推荐(0) 编辑
摘要: Spiral MatrixGiven a matrix ofmxnelements (mrows,ncolumns), return all elements of the matrix in spiral order.For example,Given the following matrix:[... 阅读全文
posted @ 2015-09-09 22:31 Sean_le 阅读(199) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 8 ··· 11 下一页