Question: 1. A student wants an algorithm to find the hardest spelling word in a list of vocabulary. They define hardest by the longest word. Write
1. A student wants an algorithm to find the hardest spelling word in a list of vocabulary. They define hardest by the longest word.
Write the code to find the longest word stored in an array of Strings called list. If several words have the same length it should print the first word in list with the longest length.
For example, if the following list were declared:
String list [] = {"high", "every", "nearing", "checking", "food ", "stand", "value", "best", "energy", "add", "grand", "notation", "abducted", "food ", "stand"};
It would print:
checking
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
