Tripadvisor Interview Question

a tipical leetcode question. Sort the array with some other conditions