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

0% completed

Vote For New Content
Hashmap additions???

arya.javadi80

Aug 19, 2023

Why do we do frequency[char] = 0 instead of frequency[char] = 1

, and then incrementing it if it appears again? In this case couldn't we get -1 for some values?

1

0

Comments
Comments

On this page