McqMate

Q. |
## What would be the asymptotic time complexity to insert an element at the second position in the linked list? |

A. | o(1) |

B. | o(n) |

C. | o(n2) |

D. | none |

Answer» A. o(1) |

781

0

Do you find this helpful?

1

View all MCQs in

Data Structure and Algorithms (DSA)No comments yet

- Consider an implementation of unsorted singly linked list. Suppose it has its representation with a head pointer only. Given the representation, which of the following operation can be implemented in O(1) time? i) Insertion at the front of the linked list ii) Insertion at the end of the linked list iii) Deletion of the front node of the linked list iv) Deletion of the last node of the linked list
- Consider an implementation of unsorted doubly linked list. Suppose it has its representation with a head pointer and tail pointer. Given the representation, which of the following operation can be implemented in O(1) time? i) Insertion at the front of the linked list ii) Insertion at the end of the linked list iii) Deletion of the front node of the linked list iv) Deletion of the end node of the linked list
- Consider an implementation of unsorted singly linked list. Suppose it has its representation with a head and tail pointer. Given the representation, which of the following operation can be implemented in O(1) time? i) Insertion at the front of the linked list ii) Insertion at the end of the linked list iii) Deletion of the front node of the linked list iv) Deletion of the last node of the linked lis
- What would be the asymptotic time complexity to add a node at the end of singly linked list, if the pointer is initially pointing to the head of the list?
- What would be the asymptotic time complexity to add an element in the linked list?
- What would be the asymptotic time complexity to find an element in the linked list?
- A variation of linked list is circular linked list, in which the last node in the list points to first node of the list. One problem with this type of list is?
- A ________ linked list is a linked list structure in which each node has a pointer to both its successor and predecessor.
- A ________ linked list is a linked list which always contains a special node, called the header node.
- Because of linear structure of linked list having linear ordering,there is similarity between linked list and array in