What would be the time complexity if the user tries to insert the element at the end of the linked list (head pointer is known)? A. O(nlogn) B. O(logn) C. O(n) D. O(1) Answer Workspace Report Discuss Answer with explanation Answer: Option C Explanation The answer is b, i.e., O(n). As it is mentioned in the above question that head pointer is known, so to insert the node at the end of the linked list; we have to traverse till the nth node. Therefore, the time complexity would be O(n). Workspace
Discuss about the question