educative.io

Solution: Minimum Window Substring - Grokking Coding Interview Patterns in

what is the res variable? it was not defined at all in the summary text


Course: Grokking Coding Interview Patterns in Python - Learn Interactively
Lesson: Solution: Minimum Window Substring

1 Like

Hello @Sean_Bivins,

Apologies for the delayed response. In the solution code, the res variable is used to store the current result, which is the minimum window substring that contains all the characters of the string t. The purpose of this variable is to keep track of the starting and ending indexes of the minimum window substring found so far; however, as you’ve mentioned, this is not written in the content and explanation of the lesson. We’ll update it and let you know once the updated version is live.

Please feel free to share more suggestions and feedback; we’d love to help you in this regard!

Happy learning!

1 Like

thank you very much for the response @Dian_Us_Suqlain !!