Build a mapping from each word to its first occurrence index in a given list of words.
Constraints
Example
[">>> word_to_index_map(['apple', 'banana', 'apple', 'cherry'])", "{'apple': 0, 'banana': 1, 'cherry': 3}", '>>> word_to_index_map([])', '{}']
Recent Submissions
No submissions yet — hit Run Tests to try!
Hints