Last active
May 23, 2016 18:20
-
-
Save eduardopoleo/0d69eb07f918695b3339e6fb59fca9f3 to your computer and use it in GitHub Desktop.
This file contains 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
```ruby | |
def all_uniq2? | |
length = self.size - 1 | |
# what's the efficiency of this | |
for i in 0..length | |
break if i == length | |
for k in i+1..length | |
return false if self[i] == self[k] | |
end | |
end | |
true | |
end | |
``` |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment