Skip to content
GATEiit

GATE CSE 2026 Session 1 Q40: Third insertion that can never yield a complete BST of 1..15

Question

Let PP be the set of all integers from 1 to 15. Consider any order of insertion of the elements of PP into a binary search tree that creates a complete binary tree.

Which one of the following elements can NEVER be the third element that is inserted?

Try it: multiple choice: exactly one correct option

Select one option
Wrong answer costs 2/3 mark in GATE.
Show answer and explanation

Answer: D (official GATE 2026 final answer key)

Concept used: A node can be inserted only after all its ancestors in the final tree.

First step: Draw the complete BST (root 8, then 4 and 12, then 2, 6, 10, 14) and count the ancestors of each option.

Full step-by-step solution

Detailed working, common mistakes and linked mock tests will be available with a free GATEiit account. Log-in is coming soon.

Share this question

WhatsAppDownload image

Source: official GATE 2026 Session 1 CS question paper and final answer key, organised by IIT Guwahati. Question paper · Answer key