zoukankan      html  css  js  c++  java
  • 队列位置错误排除

    root->right漏写置空了

    for(int i=0;i<res.size()-1;i++)
        {
            int data=res.front();
            res.pop();
            printf("%d ",data);
        }

    每弹一次队列size就会减少,这样就弹不完

  • 相关阅读:
    例5-6
    例5-5
    例5-4
    例4-5
    例4-4
    例4-3
    例4-2
    例3-11
    例3-10
    例3-9
  • 原文地址:https://www.cnblogs.com/tianyudizhua/p/13488445.html
Copyright © 2011-2022 走看看