only 2/5 test cases passing
1 count question
@sarthak051999 hey you are updating left and right without seeing if this position yield the maximum array or not. Make update only when len>max_len
If there are multiple possibilities of substrings with max count or length, then only update the first possibility your code encounters.
In simple words, do not update for equality.
If this resolves your doubt mark it as resolved.
I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.
On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.