Which of the following data structures are most appropriate for searching a…
2023
Which of the following data structures are most appropriate for searching a key in the list of elements, using Binary and Sequential search algorithms?
- A.
Link List and Queue, respectively
- B.
Link List and Array, respectively
- C.
Array and Link List, respectively
- D.
Array and Stack, respectively
Attempted by 843 students.
Show answer & explanation
Correct answer: C
Binary search requires random access to elements, which is efficiently supported by arrays. Sequential (linear) search can be performed efficiently on a linked list by traversing nodes one by one.