Qualcomm interview question

Shared a screen and asked me to code