Saw this solution somewhere could you explain the commented out code for problem sanket and strings
@abhay170 there are two ways that while loop at line 16 of code will break:
first if j reaches n then j<n condition will invalid and will break the loop or second if it reaches a break statement inside the loop and break the loop before j reaches nā¦
for both the cases what should be the value has been written in that commented part.
why is the value j-i-1?
why is there a -1 in this?
i guess that is why it is commented.