adplus-dvertising
frame-decoration

Question

Consider a linked list of n elements. What is the time taken to insert an element after element pointed by same pointer ?

a.

O(n)

b.

O(log n)

c.

O(n-1)

d.

O(1)

Answer: (d).O(1)

Engage with the Community - Add Your Comment

Confused About the Answer? Ask for Details Here.

Know the Explanation? Add it Here.

Q. Consider a linked list of n elements. What is the time taken to insert an element after element pointed by same pointer ?

Similar Questions

Discover Related MCQs

Q. The concatenation of two lists is to be performed in O(1) time. Which of the following implementations of a list could be used ?

Q. Time require to find any element of the linked list is _______.

Q. struct node *current = start->next
what "current" will contain if it is variable of type struct node ?

Q. If start is pointing to first node of the linked list then consider the following statement -

start = start->next;
current = start->next;

what will be the value of address field of current ?

Q. In Linked list implementation, a node carries information regarding _______.

Q. A linked list in which the last node of Linked list points to the first is called a _________.

Q. A doubly linked list performs traversal in _________.

Q. Linked list data structure usage offers considerable saving in

Q. Consider linked list is used to implement the Stack then which of the following node is considered as Top of the Stack ?

Q. The link field in the last node of the linked list contains _________.

Q. When new element is added in the middle of singly linked list then ________.

Q. Which of the following operation is performed more efficiently in doubly linked list ?

Q. If in a linked list address of first node is 1020 then what will be the address of node at 5th position ?

Q. In Circular Linked List insertion of a node involves the modification of ____ links.

Q. The time required to search an element in a linked list of length n is

Q. The worst case time required to search a given element in a sorted linked list of length n is

Q. If a list contains no elements it is said to be

Q. In a linked list array, objects are referred to as

Q. Linked list uses

Q. Number of elements stored in any list is called its