what's the meaning of the while loop in the 8th problem?
hscspring opened this issue · comments
Yam(长琴) commented
else if(pNode->m_pParent != nullptr)
{
BinaryTreeNode* pCurrent = pNode;
BinaryTreeNode* pParent = pNode->m_pParent;
while(pParent != nullptr && pCurrent == pParent->m_pRight)
{
pCurrent = pParent;
pParent = pParent->m_pParent;
}
pNext = pParent;
}
what's the meaning of the while loop?
Yam(长琴) commented
oh, i get that