Need a hint?....Recommended(Try first)


#1

Try two pointer approach…It will become easy.
Don’t u dare think about sorting.