create a hash having 'key' as length of the element and value as an array of all the elements of that length.
groups the above hash into 2 groups of 'even' and 'odd' length using 'inject'.