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
though once you know that i’d expect a candidate to bang it out fairly quickly. it’s not that many lines of code.
jasonpeacock•10h ago
mauricioc•10h ago
The "1x3x1=1" part for the earlier example is a typo indeed, it should be 3.
Jtsummers•10h ago
The second one isn't an error, but a poor explanation. After a balloon is burst, the balloons now have new neighbors. That is, it isn't this:
It's: The distance between the balloons doesn't make them not neighbors.