Bharti Airtel interview question

Sort the string, Count words in the statement