Tibra Interview Question

leetcode medium dynamic programming task