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

0% completed

Vote For New Content
I didn't really get the window " In the current window, ...." . Can anyone expl...

Ngân Nguyễn

Dec 7, 2022

I didn't really get the window " In the current window, ...." . Can anyone explain that? Tks in advance.

0

0

Comments
Comments
S
Sumit 3 years ago

If you are like me, you might have missed that in this problem, we are storing the index of the character in the map and not its frequency. Also, we are not removing anything from the map. So, any character added to the map, stays there.

Now, consider the first example...

On this page