Category: dynamic programming
Given a square array of integers A, we want the minimum sum of a falling path through A. A falling path starts at any element in the first row, …
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 …
Given a string, your task is to count how many palindromic substrings in this string. The substrings with different start indexes or end indexes are counted as different substrings …
A message containing letters from A-Z is being encoded to numbers using the following mapping: ‘A’ – 1 ‘B’ – 2 … ‘Z’ – 26 Given a non-empty string …
A kangaroo is at one side of the river. There are N springs in the river, each is separated 1 meter, like this: K| . . . . . …