GATE CS 2000 · Arrays & Matrix Representation

MCQ · 1 mark · Problem PROG-DSTR-0251

Let LASTPOST, LASTIN and LASTPRE denote the last vertex visited `in a 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

Solve it on GATE DA practice →More Basic Data Structures problems

Show the worked solutionOfficial GATE Answer Key: Option D.See full step-by-step discussion on GateOverflow: https://gateoverflow.in/663/gate2000-2-16

GATE DA practice: past exam problems by chapter, with worked solutions · gatedaprep.com