Skip to content

Conversation

@jsca-kwok
Copy link
Member

This PR proposes to add a hash solution to check for isomorphic strings

# s and t consist of any valid ascii character.

# Approach 1: Hash Map
# Time Complexity: O(N)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's the space complexity of this algorithm?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's the space complexity of this algorithm?

Would it be O(N) because of the loop?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you're right. It'sO(N) where N is the length of the s array.

@vbrazo vbrazo merged commit f7538d0 into TheAlgorithms:master Jul 21, 2021
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

Successfully merging this pull request may close these issues.

2 participants