title: Time complexity of level order traversal
body: <p>What is the time complexity of binary tree level order traversal ? Is it O(n) or O(log n)? </p>
  
  <pre><code>void levelorder(Node *n)
  {    queue &lt; Node * &gt;q;
       q.enqueue(n);
  
       while(!q.empty())
        {
           Node * node = q.front();
           DoSmthwith node;
           q.dequeue();          
           if(node-&gt;left != NULL)
           q.enqueue(node-&gt;left);
           if (node-&gt;right != NULL)
           q.enqueue(node-&gt;right);
        }
  
  }
  </code></pre>