What would be the asymptotic time complexity to add a node at the end of singly linked list, if thepointer is initially pointing to the head of the list?
A. O(1)
B. O(n)
C. θ(n)
D. θ(1)
Answer:C
What would be the asymptotic time complexity to add a node at the end of singly linked list, if thepointer is initially pointing to the head of the list?
A. O(1) B. O(n) C. θ(n) D. θ(1)