Consider a linked list of n elements. What is the time taken to insert an element after an element pointed by some pointer?
A. O(1)
B. O(log2 n)
C. O(n)
D. O(n log2 n)
Answer:A
Consider a linked list of n elements. What is the time taken to insert an element after an element pointed by some pointer?
A. O(1) B. O(log2 n) C. O(n) D. O(n log2 n)