Qualcomm Interview Question

explain your work