What kind of linked list is best to answer question like “What is the item at position n?” a) Singly linked list b) Doubly linked list c) Circular linked list d) Array implementation of linked list
D) because it takes O(1). Rest takes O(n).
Watch this for better understanding https://www.youtube.com/watch?v=BL1JOVqTlW8
64.3k questions
77.9k answers
244k comments
80.0k users