Created
July 6, 2017 10:17
-
-
Save CharlyMartin/92a8047169b47181279587069ec604d0 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def size_splitter(array, size) | |
small_words = [] | |
big_words = [] | |
array.each do |element| | |
if element.size == size | |
small_words << element | |
else | |
big_words << element | |
end | |
end | |
return [small_words.sort, big_words.sort] | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment