Qualcomm Interview Question

Shared a screen and asked me to code