Beam interview question

Case study with optimization included