Which of the following exhibit temporal locality: 1. Repetition control flow 2. Linear search on an array of integers 3. Accessing the first element of each row in a 2D array that is heap allocated as an array of arrays
Temporary locality occurs when a program accesses an instruction or a data, there is a high probability that this same instruction or data will be accessed again soon.