136k views
2 votes
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

User Timo Stamm
by
4.8k points

1 Answer

1 vote

Answer:

1, 2 and 3

Step-by-step explanation:

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.

User Iwgx
by
4.2k points