Question DSA-LL-0023
EasyWhat is the time complexity of inserting at the end of a singly linked list when only the head pointer is kept?
- A.
O(n²)
- B.
O(log n)
- C.
Show answer and explanation
Answer: C
You must walk from the head to the last node first.