Broadcom Interview Question

some questions in Algorithms