Pastebin
API
tools
faq
paste
Login
Sign up
SHARE
TWEET
combine_anagrams
jctt
Feb 21st, 2013
47
0
Never
Add comment
Not a member of Pastebin yet?
Sign Up
, it unlocks many cool features!
Ruby
0.18 KB
| None
|
0
0
raw
download
clone
embed
print
report
def
combine_anagrams
(
words
)
h =
Hash
[
words.
map
{
|
x
|
[
x.
downcase
.
chars
.
sort
.
join
,
Array
.
new
]
}
]
words.
each
{
|
x
|
h
[
x.
downcase
.
chars
.
sort
.
join
]
.
push
(
x
)
}
return
h.
values
end
Advertisement
Add Comment
Please,
Sign In
to add comment
Public Pastes
✅ Monetizing Technique
CSS | 10 min ago | 0.17 KB
⭐ Free Money Guide ⭐
CSS | 10 min ago | 0.18 KB
API Glitch that made me $5900
CSS | 10 min ago | 0.19 KB
Untitled
35 min ago | 10.16 KB
tmp006.py
Python | 3 hours ago | 0.28 KB
Untitled
7 hours ago | 6.45 KB
Untitled
12 hours ago | 0.01 KB
Secrets.kdbx
12 hours ago | 147.38 KB
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the
Cookies Policy
.
OK, I Understand
Not a member of Pastebin yet?
Sign Up
, it unlocks many cool features!