The Gateway to Computer Science Excellence
0 votes
92 views

An OS uses virtual memory with paging technique for memory allocation. Which of the following searching technique on given data structure use locality of reference?

  1. Linear search on linked list
  2. Binary search on array
  3. Linear search on array
  4. Binary search on linked list
in Programming by Veteran (117k points) | 92 views
0
I am thinking it would be A.

what is the given answer ?
0
given c)

but why linear search, not binary search?
0
As array DS is continuous in memory location therefore both Spatial and temporal locality is possible ,therefore answer is C.
0
i read the question in converse way... but i will come back with my approach to answer this question

Please log in or register to answer this question.

Quick search syntax
tags tag:apple
author user:martin
title title:apple
content content:apple
exclude -tag:apple
force match +apple
views views:100
score score:10
answers answers:2
is accepted isaccepted:true
is closed isclosed:true
50,647 questions
56,492 answers
195,439 comments
100,706 users