Maximum length Unique character substring(sliding window)

Here’s the code. Can you please tell me if in line number 25

i-current_len>last_occ this condition does it matter??

Because when I do the dry run I am not getting any condition where I have to check for this condition. Can you please tell me where this condition matters!

hello @div_yanshu07

yeah it matters.
we can include current character when
a) it occured first time.

or

b) if it does not fall in our current window. how we can check this ?
using this i-current_lenght > last_occrence
i-current_length will give starting index of current window .
if last occurence is less than starting index of current window then include it.

so this is why we have added that condition