code to split sort and join an array of alphabets
Update soln. for sorting numbers in array