Skip to main content

Practice · 4 of 5

Last occurrence

CHALLENGE
Difficulty: beginner+25 XP

Implement int lastIndexOf(ArrayList<String> list, String target): the highest index holding target, or -1 when absent. Walk backwards and return early.

Back to lesson: Practice: List practice