最新 最热

Backtracking - 78. Subsets

Given a set of distinct integers, nums, return all possible subsets (the power set).

2020-09-23
1

Dynamic Programming - 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.

2020-09-23
1

Dynamic Programming - 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 ...

2020-09-23
0

Dynamic Programming - 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.

2020-09-23
1

Dynamic Programming - 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 2D grid. ...

2020-09-23
1

Dynamic Programming - 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.

2020-09-23
1

Dynamic Progamming - 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 rob...

2020-09-23
1

Dynamic Programming - 62. Unique Paths

A robot is located at the top-left corner of a m x n grid (marked 'Start' in the diagram below).

2020-09-23
1

Array - 121. Best Time to Buy and Sell Stock

Say you have an array for which the _i_th element is the price of a given stock on day i.

2020-09-23
1

设计模式之外观模式

外观模式(Facade)是23种设计模式之一,也称为门面模式。DP中是这么定义外观模式的:

2020-09-23
1