Swiggy Interview Question

Binary tree, array, greedy, design splitwise