Qualcomm interview question

Code and debug some code on whiteboard