This is fairly old Leetcode problem (who probably got it from somewhere else)
https://leetcode.com/problems/burst-balloons/description/
Its tricky and if I got this problem in a tech interview, I would be hard-pressed to solve it in 45 minutes if I hadn't seen it before