Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def unusualLexOrder(words)
- x = 0
- array = Array.new
- while (x < words.length)
- array[x] = words[x].reverse
- x = x + 1
- end
- array = array.sort
- x = 0
- while (x < array.length)
- array[x] = array[x].reverse
- x = x + 1
- end
- return array
- end
Advertisement
Add Comment
Please, Sign In to add comment