Flipkart Interview Question

Greedy, 2 pointers, strings, oops, sorting