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

0% completed

Vote For New Content
Hello, is the hashmap even needed? Can't you just get the first character in the...

Juan Garcia

Aug 8, 2022

Hello, is the hashmap even needed? Can't you just get the first character in the string while the distinct is > k, then delete it and check if is still in the string in the while loop, if it is then the distinct stays the same and you go to the next character and repeat until the distinct reduces.

0

0

Comments
Comments

On this page