Just give me hint how to start sloving this question

please just give me a hint or stating hint how to solve this question

@711tri
Hello Ayush,
hint is to use two pointer approach.