Mental Model
We want to find how many words start with a certain beginning part (prefix). We check each word to see if it begins with that prefix and count it.
Analogy: Imagine you have a box of books and you want to count how many titles start with the word 'The'. You look at each title and count only those that start with 'The'.
words: ["apple", "app", "ape", "bat", "ball"] prefix: "ap" We check each word: "apple" -> starts with "ap" -> count++ "app" -> starts with "ap" -> count++ "ape" -> starts with "ap" -> count++ "bat" -> no "ball" -> no