From d4b1efef5ab88e9db1c7cde67c50cdce88b76df5 Mon Sep 17 00:00:00 2001 From: Jessica Kwok <60627484+jsca-kwok@users.noreply.github.com> Date: Fri, 2 Jul 2021 13:54:01 -0700 Subject: [PATCH] Added space complexity --- data_structures/hash_table/isomorphic_strings.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/data_structures/hash_table/isomorphic_strings.rb b/data_structures/hash_table/isomorphic_strings.rb index ba2ab76..cc875ab 100644 --- a/data_structures/hash_table/isomorphic_strings.rb +++ b/data_structures/hash_table/isomorphic_strings.rb @@ -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 \ No newline at end of file +# => true