can’t understand what the run errors are in 2 test cases
Run Error in 2 test cases
@shubhamkumarsingh bro try your code on this input
fcahgdeb
your code is giving stack overflow due to infinite recursion.
So dry run ya code.
Also a piece of advise is simply use Collections.sort on ArrayList.