Firework interview question

Python Algorithmic Questions, nothing super tricky