Skip to main content

4 docs tagged with "Dynamic Programming"

View all tags

01 Matrix

Given a binary matrix, find the shortest distance from each cell to the nearest '0' cell.

Climbing Stairs

You need to find the number of distinct ways to climb a staircase with `n` steps, given that you can take either 1 or 2 steps at a time.

Coin Change

Find the minimum number of coins to make a target amount, or return -1 if impossible