📢 Too many exams? Don’t know which one suits you best? Book Your Free Expert 👉 call Now!


    Question

    In a Max-Heap, what is the relationship between a parent

    node and its children?
    A The parent node's value is less than or equal to its children's values. Correct Answer Incorrect Answer
    B The parent node's value is greater than or equal to its children's values. Correct Answer Incorrect Answer
    C The parent node's value is always equal to its children's values. Correct Answer Incorrect Answer
    D There is no specific relationship; it depends on insertion order. Correct Answer Incorrect Answer
    E The parent node has only one child. Correct Answer Incorrect Answer

    Solution

    This is the defining property of a Max-Heap the value of any parent node is always greater than or equal to the values of its children. This ensures the largest element is at the root.

    Practice Next
    ask-question