Ong & Shan interview question

first round will be JAM