From the input 'banana orange grape', which output represents the correct sequence after rearranging the words by length?

Answer: D. grape banana orange
The words are rearranged by length: grape (5), orange (6), banana (6).