- 博客(12)
- 收藏
- 关注
原创 10. Regular Expression Matching
题意:Implement regular expression matching with support for ‘.’ and ‘*’.'.' Matches any single character.'*' Matches zero or more of the preceding element.The matching should cover the entire input stri
2017-03-15 20:48:16 290
原创 279. Perfect Squares
题意: Given a positive integer n, find the least number of perfect square numbers (for example, 1, 4, 9, 16, …) which sum to n.For example, given n = 12, return 3 because 12 = 4 + 4 + 4; given n = 13, re
2017-03-14 20:52:17 415
原创 322. Coin Change
题意: You are given coins of different denominations and a total amount of money amount. Write a function to compute the fewest number of coins that you need to make up that amount. If that amount of mon
2017-03-12 15:26:47 378
原创 221. Maximal Square
题意: Given a 2D binary matrix filled with 0’s and 1’s, find the largest square containing only 1’s and return its area.For example, given the following matrix:1 0 1 0 01 0 1 1 11 1 1 1 11 0 0 1 0Ret
2017-03-12 13:43:21 345
原创 213. House Robber II
题意:After robbing those houses on that street, the thief has found himself a new place for his thievery so that he will not get too much attention. This time, all houses at this place are arranged in a
2017-03-11 13:45:20 258
原创 198. House Robber
题意:You are a professional robber planning to rob houses along a street. Each house has a certain amount of money stashed, the only constraint stopping you from robbing each of them is that adjacent hou
2017-03-10 23:08:50 242
原创 64. Minimum Path Sum
题意:Given a m x n grid filled with non-negative numbers, find a path from top left to bottom right which minimizes the sum of all numbers along its path.Note: You can only move either down or right at a
2017-03-07 22:18:57 249
原创 152. Maximum Product Subarray
题意: Find the contiguous subarray within an array (containing at least one number) which has the largest product.For example, given the array [2,3,-2,4], the contiguous subarray [2,3] has the largest p
2017-03-06 20:27:34 250
原创 63. 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 is marked as 1 and 0 respectively in the grid.For
2017-03-06 20:12:13 229
原创 63. 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 is marked as 1 and 0 respectively in the grid.For
2017-03-06 17:00:53 246
原创 62. 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 reach the
2017-03-06 15:14:01 297
原创 70. Climbing Stairs
题意:You are climbing a stair case. It takes n steps to reach to the top.Each time you can either climb 1 or 2 steps. In how many distinct ways can you climb to the top?Note: Given n will be a positive i
2017-03-05 14:40:13 231
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人