Let LASTPOST, LASTIN, and LASTPRE denote the last vertex visited in postorder,…

GATE · 2000 · CS · Question 2 subparts

Let LASTPOST, LASTIN, and LASTPRE denote the last vertex visited in postorder, inorder, and preorder traversal respectively, of a complete binary tree. Which of the following is always true?

  1. A.

    LASTIN = LASTPOST

  2. B.

    LASTIN = LASTPRE

  3. C.

    LASTPRE = LASTPOST

  4. D.

    None of the above

Attempted by 318 students.

Sign up free to check your answer

Sign up free

Explore the full course: Gate Guidance By Sanchit Sir

Loading lesson…