Last active
August 16, 2017 18:38
-
-
Save eduardopoleo/bb8c184e804e20a168589ad16e87338b to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def unique_with_hash2(s) | |
| characters = {} | |
| s.each_char do |char| | |
| return false if characters[char] | |
| characters[char] = true | |
| end | |
| return true | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment