Skip to content

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

@ckane30691

Description

@ckane30691

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions