Lyft Interview Question

Medium dynamic programming question from leetcode.