Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Isomorphic Substring Problem W2D4-B in Pairboarding Problems Directory Should be O(1) not O(n) #21

Open
ckane30691 opened this issue Jan 31, 2022 · 0 comments

Comments

@ckane30691
Copy link
Collaborator

https://github.com/appacademy/graduated-job_seeker-program/blob/master/pairboarding-problems/w2d4-b.md
The hashmap in this solution will be bounded by the fact that there are only 26 letters in the alphabet, 10 numbers, and some number of symbols meaning that in this case we can say that the map is O(1). You can imagine that even if we had a string with 1 million characters, our hashmap will not grow linearly to 1 million entries as their will only be so many unique keys before you start overwriting existing keys or in the case that the values don't match you'll return from the function early.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant