Final answer:
To apply selection sort to words based on given requirements, compare the lengths of the words and alphabetically if length is equal. Ignore case. Sort the words in ascending order with longest at the rightmost position. Use left-to-right progress order.
Step-by-step explanation:
To apply selection sort according to the given requirements, start by comparing the lengths of the words. If two words have equal lengths, compare them alphabetically. Ignore the case when comparing. Sort the words in ascending order, with the longest word at the rightmost position. Follow a left-to-right progress order, where the sorted data starts from the left to right.
For example, suppose we have the words: 'apple', 'Banana', 'cat', 'dog', 'elephant', 'giraffe', 'Apple', 'DOG'.
- The first step is to compare 'apple' and 'Banana'. Since 'Banana' is longer, it should be placed to the right of 'apple'. The updated list becomes: 'apple', 'Banana', 'cat', 'dog', 'elephant', 'giraffe', 'Apple', 'DOG'.
- Next, compare 'Banana' and 'cat'. Since 'cat' is shorter, it should be placed to the right of 'Banana'. The updated list becomes: 'apple', 'Banana', 'cat', 'dog', 'elephant', 'giraffe', 'Apple', 'DOG'.
- Continue comparing and rearranging the words until the list is sorted in the required order.