Added space complexity

This commit is contained in:
Jessica Kwok 2021-07-02 13:54:01 -07:00 committed by GitHub
parent 07c7bd1f27
commit d4b1efef5a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -24,6 +24,7 @@
# Approach 1: Hash Map
# Time Complexity: O(N)
# Space Complexity: O(N)
def isomorphic_strings_check(s, t)
# store character mappings
@ -60,4 +61,4 @@ puts isomorphic_strings_check("foo", "bar")
# => false
puts isomorphic_strings_check("paper", "title")
# => true
# => true