1 votes 1 votes 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 Programming in C linked-list data-structures algorithms + – pradeepchaudhary asked Aug 19, 2018 recategorized Jul 6, 2022 by Lakshman Bhaiya pradeepchaudhary 1.8k views answer comment Share Follow See all 2 Comments See all 2 2 Comments reply MiNiPanda commented Aug 19, 2018 reply Follow Share D) because it takes O(1). Rest takes O(n). Watch this for better understanding https://www.youtube.com/watch?v=BL1JOVqTlW8 0 votes 0 votes Rishav Kumar Singh commented Aug 19, 2018 reply Follow Share Yes option D because random access is possible with array using indices. 1 votes 1 votes Please log in or register to add a comment.
0 votes 0 votes Yes for array implementation time would be order(1) but why not answer is double linked list here also to access the last element time would be order(1) correct if I am wrong Kaluti answered Aug 21, 2018 Kaluti comment Share Follow See all 2 Comments See all 2 2 Comments reply Adittya commented Sep 24, 2018 reply Follow Share since it is not random accessed 0 votes 0 votes DAWID15 commented Dec 22, 2021 reply Follow Share This is because all the linked list have the property of sequential access which means if you want to access any kth element you have to traverse all its previous nodes. You can’t simply jump to any node just like you do for array. 0 votes 0 votes Please log in or register to add a comment.