Mental Model
Find where a number first appears and last appears in a list by checking each item one by one.
Analogy: Imagine looking through a row of books to find the first and last time a certain title shows up on the shelf.
Index: 0 1 2 3 4 5 6
List: 2 -> 3 -> 5 -> 3 -> 7 -> 3 -> 9
↑ ↑
first? last?