Complexity issue

how we can say that each node is pushed once and popped once so its complexity becomes o(n). plz explain???

hey since the number of nodes is n and we will iterate each node only once the complexity will be O(n). we only iterate over the nodes in the queue.