Remitly interview question

1. easy question, sort an array. 2. hard question, implement sleep without setTimeout and set interval