Please post the code for this problem as the code given in the solution is not passing any test case.
Please post the solution
@jayasmit98
the problem in the editorial was that the temp array size was just 10000.
I have attached the correct code…