why did bhaiya do -> i-current_len > last_occ
i mean what does it mean??
(line 25)
why did bhaiya do -> i-current_len > last_occ
i mean what does it mean??
(line 25)
i means you current position in the sting.
i-current_len > last_occ is basically to check that if the current character is not present in the current window. last_occ is the position/index at which current character last occured. i-current_len is the position from where your current window starts. You have to ensure that no duplicate character occurs in a window. This is why we do this check
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.