The code for the no-arg LinkedList constructor is given in Program . Since the fields head and tail are initially null, the list is empty by default. As a result, the constructor does nothing. The running time of the no-arg constructor is clearly constant. That is, T(n)=O(1).
Program: LinkedList no-arg constructor.