Write a function sortCharacters(text) that removes all whitespace from the string text and returns the other characters sorted.
text has only ASCII characters: letters, digits, punctuation and whitespace.\t and a line break \n or \r. All of it goes, not only spaces.! and , come before the digits, the digits come before the capital letters, and the capital letters come before the small letters. So 'Z' comes before 'a'.'banana' gives 'aaabnn'.''.sortCharacters('My Name is Nikhil')Returns 'MNNaehiiiklmsy'
sortCharacters('Zebra 123')Returns '123Zaber'
Asked at Cognizant · Source
sortCharacters('My Name is Nikhil')'MNNaehiiiklmsy'sortCharacters('b a')'ab'Hidden tests run on Submit.