The postorder traversal of a binary tree is 8,9,6,7,4,5,2,3,1. The inorder traversal of the same tree is 8,6,9,4,7,2,5,1,3. The height of a tree is the length of the longest path from the root to any leaf. The height of the binary tree above is ______.
GATE CS 2018 (Forenoon) — Question 30
Data StructuresLinked Lists & Binary TreesNAT1 markMedium
A GATE question every morning
One real past-paper question every morning for your branch, answer hidden until you tap. Free on Telegram.
More on Linked Lists & Binary Trees
- GATE CS 2026 (Forenoon) · Q33The height of a binary tree is the number of edges in the longest path from the root to a leaf in the tree. The maximum possible height of…
- GATE CS 2026 (Forenoon) · Q39Consider the following code snippet in C language that computes the number of nodes in a non-empty singly linked list pointed to by the poi…
- GATE CS 2026 (Afternoon) · Q12The set T represents various traversals over binary tree. The set S represents the order of visiting nodes during a traversal. T I: Inorder…
- GATE CS 2025 (Forenoon) · Q62Let LIST be a datatype for an implementation of linked list defined as follows: c typedef struct list int data; struct list next; LIST; Sup…
- GATE CS 2025 (Afternoon) · Q13Consider a binary tree T in which every node has either zero or two children. Let n > 0 be the number of nodes in T . Which ONE of the foll…
- GATE CS 2023 (Forenoon) · Q13Let SLLdel be a function that deletes a node in a singly-linked list given a pointer to the node and a pointer to the head of the list. Sim…

