Qualcomm Interview Question

they asked some brain puzzles.