Tag: dynamic programming
It is said a Google Interview Question: You are given two eggs to test the minimal height (from 1 to 100) the egg will break if dropped at that …
Let’s see this question: If Jack starts at A, and he can only travels one move at a time to the north or east, and he cannot go back. …
Given a non-negative integer n, please find out the number of integers that have the unique digits between [0, 10^n). For example, if n = 2, there are 91 …
There is a 2D binary matrix M filled with 0’s and 1’s, your task is to find the largest square containing all 1’s and return its area. For example, …
This is an interesting problem that can be solved using Dynamic Programming (DP). The question is to count how many ways to connect the pipes like the following (Pipes …