Vidyalelo
Data Structure · Q194

Introduction to Data Structures

Programming · Data Structure · question 194

Q194

What would be the asymptotic time complexity to insert an element at the front of the linked list (head is known)?

A.
O(1)
Answer
B.
O(n)
C.
O(n2)
D.
O(n3)

Answer: Option A

Solution

Answer: Option A
No explanation is given for this question Let's Discuss on Board