Sponsored
Use these hints if you're stuck. Try solving on your own first.
Divide the string into the words as an array of strings
Sort the words by removing the last character from each word and sorting according to it
Solve with full IDE support and test cases