mirror of
https://github.com/TheAlgorithms/Ruby
synced 2024-12-25 21:58:57 +01:00
Added space complexity
This commit is contained in:
parent
07c7bd1f27
commit
d4b1efef5a
1 changed files with 2 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue