Please explain the solution provided by coding blocks

Please explain the solution provided by coding blocks.
I am unable to understand the loop where j runs from i+1 to end of string.

hey @indrabijaynarayan
I would suggest it. Create a call stack or recursion tree for small inputs like the string “aba”, then you can think about how is the code working, anyway,
If you do not understand. I will help.
but first try yourself