The program is passing various test cases but not getting accepted.The link of code:
Wrong answer on submitting the code
@shubham_garud5 just sort the array then apply your algo
hackerblocks dont support multiple ans right now so acc to the output of testcases array have to be sorted , your code was fine
dont forget to hit like and mark resolved if cleared