题目
题目
单项选择题

Which XXX completes the C++ AVL tree Node class's SetChild() function? bool SetChild(Child whichChild, Node* child) { if (whichChild == LEFTCHILD) { left = child; } else { right = child; } if (child) { XXX } UpdateHeight(); return true; }

查看解析

查看解析

标准答案
Please login to view
思路分析
The question asks which snippet should complete the SetChild() function in a C++ AVL tree Node class. First, observe what the function currently does: it assigns the given child to either the left or right pointer depending on whichChild, and if a non-null child is provided, it should perform an additional setup before updating the node's height and returning. Since there are no alternative answer options listed in ......Login to view full explanation

登录即可查看完整答案

我们收录了全球超50000道考试原题与详细解析,现在登录,立即获得答案。

更多留学生实用工具

加入我们,立即解锁 海量真题独家解析,让复习快人一步!