I think in general it should be O(n) as best case is O(1) answorst is O(n). But the question specifies that we have to add a node at last when the pointer is initially at start. So in best case and worst case both it comes O(n) that's why the answer is Theta(n).