This is a question from Cormen 3rd edition(exercise 10.1). I am of the opinion that the complexity should be O(1), as we just have to look into the next pointer of the current node.
But the answers from the web suggest that it should be O(n). Where am I getting it wrong?
Can someone please help me out???
Thanks in advance!