Mental Model
Find where a number first appears and last appears in a list by checking each item from start to end.
Analogy: Imagine looking for a friend's name in a guest list. You note the first time you see their name and the last time it appears before the list ends.
Array: [2, 4, 4, 5, 4, 7] Indexes: 0 1 2 3 4 5 We want to find first and last position of 4.