How to approach this problem

please tell how to traverse the array fro finding the largest substring

@pragyachoudhary1111 hey pragya see this