Practice · 1 of 5
Longest with earliest tie
CHALLENGE
Difficulty: intermediate+25 XP
Implement String longest(String[] words): the earliest of the longest strings, null for empty input. One pass, strict comparison — think about which comparison operator keeps the earlier winner.
Press Submit to check your solution.
Back to lesson: Practice: Flow lab