C ++ Programming Beauty - France (Listing 3-15) Structure

Listing 3-15

// 层次遍历二叉树
// root,二叉树的根节点
void PrintNodeByLevel(Node* root)
{
     for(int level=0; ; level++)
     {
          if(!PrintNodeAtLevel(root, level)) 
               break;
          cout << endl;
     }
}
Released 1246 original articles · won praise 951 · views 70000 +

Guess you like

Origin blog.csdn.net/weixin_42528266/article/details/104028127