Grokking the Coding Interview: Patterns for Coding Questions
Ask Author
Back to course home

0% completed

Vote For New Content
I don't think the reason why we need to check "if min_length > window_end - wind...

Bharpur Singh

Sep 20, 2022

I don't think the reason why we need to check "if min_length > window_end - window_start + 1" in while loop and then update substr_start because everytime if matched == pattern's length then we have a valid pattern and we can shrink window and set the new start. Can we replace Option 1 with Option 2. Correct me if i am wrong.

0

0

Comments
Comments

On this page