@0xansh_ time limit was 2 seconds right, 2000 ms. so it's safe. I didn't think much about it. I think my solution was like O (nlogn), because I used map while iterating through array. it should work ...
Some results have been hidden because they may be inaccessible to you
Show inaccessible results