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?
A. O(1)
B. O(n)
C. θ(n)
D. Both O(n) and θ(n)
Answer: Option D
A. O(1)
B. O(n)
C. θ(n)
D. Both O(n) and θ(n)
Answer: Option D
A. A collection of data values
B. A programming language
C. A set of algorithms
D. A way of organizing and storing data
Join The Discussion