Question 114Asked in DSSSB TGT Computer Science, 25 Jun 2023, Shift 3 (4:30 PM)What is the main advantage of using linked lists over arrays in data structures?
- ALinked lists have faster access time than arrays for large data sets.
- BLinked lists use less memory than arrays.
- CLinked lists can be resized more easily than arrays.
- DLinked lists are more efficient for inserting and deleting elements at any position.
Show answerHide answer
Correct answer: (D) Linked lists are more efficient for inserting and deleting elements at any position.
Explanation
Inserting or deleting in a linked list only changes pointers (O(1) once the position is known). In an array, elements have to be shifted.