InterviewSolution
Saved Bookmarks
| 1. |
Which of the following points is/are not true about Linked List data structure when it is compared with an array?(a) Arrays have better cache locality that can make them better in terms of performance(b) It is easy to insert and delete elements in Linked List(c) Random access is not allowed in a typical implementation of Linked Lists(d) Access of elements in linked list takes less time than compared to arraysQuery is from Singly Linked List Operations topic in chapter Abstract Data Types of Data Structures & Algorithms II have been asked this question in a job interview. |
|
Answer» RIGHT option is (d) Access of elements in linked list takes less time than compared to ARRAYS Easy explanation - To access an element in a linked list, we need to TRAVERSE every element until we reach the desired element. This will take more time than arrays as arrays PROVIDE random access to its elements. |
|