Tag: Dynamic Programming

Leetcode 64 Minimum Path Sum
Problem 64 Minimum Path Sum Given a m x n grid filled with nonnegative 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 any point in time. Similar to…

Leetcode 121 Best Time to Buy and Sell Stock
Problem 121 Best Time to Buy and Sell Stock Say you have an array for which the ith element is the price of a given stock on day i. If you were only permitted to complete at most one transaction (ie, buy one and sell one share of the stock)…

Leetcode 62 Unique Paths
Problem 62 Unique Paths A robot is located at the topleft 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 bottomright corner of the grid…