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

0% completed

Vote For New Content
Why is the case, where we find a character that is not in the hash map 'charFreq...

Meghana

Oct 2, 2022

Why is the case, where we find a character that is not in the hash map 'charFrequency', is not handled? Is it not required or is it assumed that we should handle it? If it is not required, please explain why.

0

0

Comments
Comments
A
Aniket Joshi2 years ago

As the problem explains an anagram is a permutation of the given pattern. So, if the pattern is "abc" why would I look at a character which is not in the set of ('a','b','c')? it has to be strictly from the pattern set right?so not handling the case means in itself we a...

On this page