Skip to main content

Practice ยท 3 of 4

Last-occurrence index map

CHALLENGE
Difficulty: beginner+25 XP

Implement static Dictionary<string, int> LastIndex(IEnumerable<string> items) โ€” each distinct item mapped to the index of its **last** occurrence. Null/empty yields an empty dictionary.

Back to lesson: Practice: Collection workout