UBS interview question

Mock test on general alogorithm