K Kim Trang New member Sep 16, 2021 #1 What is the space complexity for deleting a linked list? A. O(1) B. O C. Either O(1) or O D. O(logn)
P Phạm Thanh Nam New member Sep 16, 2021 #2 Answer: A Explanation: You need a temp variable to keep track of current node, hence the space complexity is O(1). Upvote 0 Downvote
Answer: A Explanation: You need a temp variable to keep track of current node, hence the space complexity is O(1).