DEV Community

Discussion on: Daily Challenge #177 - Supersize Me

Collapse
 
cipharius profile image
Valts Liepiņš

Yet another Ruby one liner:

def superSize int
    int.to_s.chars.sort.reverse!.join.to_i
end

Also neat how it reads almost literarly, no need to explain each step in the chain!