Skip to content

Instantly share code, notes, and snippets.

@eduardopoleo
Last active May 23, 2016 18:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save eduardopoleo/0d69eb07f918695b3339e6fb59fca9f3 to your computer and use it in GitHub Desktop.
Save eduardopoleo/0d69eb07f918695b3339e6fb59fca9f3 to your computer and use it in GitHub Desktop.
```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