Analyzing running time of remove() method of Queue.