Skip to content

Instantly share code, notes, and snippets.

@CharlyMartin
Created July 6, 2017 10:17
Show Gist options
  • Save CharlyMartin/92a8047169b47181279587069ec604d0 to your computer and use it in GitHub Desktop.
Save CharlyMartin/92a8047169b47181279587069ec604d0 to your computer and use it in GitHub Desktop.
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