Broadcom interview question

some questions in Algorithms