DEV Community

Discussion on: Daily Challenge #177 - Supersize Me

Collapse
 
abdellani profile image
Mohamed ABDELLANI • Edited
def superSize(x)
 x.to_s.to_s.split("").sort{|x,y|-(x<=>y)}.join.to_i
end