Qualcomm interview question

Nothing insanely hard