Binary Trees and Search Trees Quiz

LustrousNephrite3669 avatar
LustrousNephrite3669
·
·
Download

Start Quiz

Study Flashcards

10 Questions

What is a leaf node in a tree?

A node that has no children

What is an ancestor node in a tree?

Any predecessor node on the path from root to that node

What are sub-trees in a tree?

Trees T1, T2, and T3 if the root node is not NULL

What is the root node in a tree?

The topmost node in the tree with no parent

What are siblings in a tree?

Nodes with common parent

What is a binary tree?

A binary tree is a tree data structure in which each node has at most two children, referred to as the left child and the right child.

What is a threaded binary tree?

A threaded binary tree is a binary tree in which all the leaf nodes are connected in either in-order or post-order, making it easier to traverse the tree without using recursion or stack.

What is a path in a tree?

A path in a tree is a sequence of consecutive edges that connects nodes in the tree, typically from the root node to a specific node.

What is a leaf node in a tree?

A leaf node in a tree is a node that has no children, meaning it is located at the end of a branch and does not have any further nodes connected to it.

What is an ancestor node in a tree?

An ancestor node in a tree is any predecessor node on the path from the root to a specific node, excluding the root node itself.

Study Notes

Tree Data Structure

  • A leaf node is a node in a tree that has no children, i.e., it is a terminal node with no further branches.

Node Relationships

  • An ancestor node is a node that is above a given node in the tree, i.e., it is a parent or a grandparent, etc. of the node.
  • Sibling nodes are nodes that have the same parent node, i.e., they are at the same level in the tree and are children of the same parent.

Tree Structure

  • The root node is the topmost node in a tree, i.e., it is the node that has no parent node.

Tree Types

  • A binary tree is a tree in which each node has at most two children, i.e., a left child and a right child.

Variations

  • A threaded binary tree is a binary tree in which the empty child pointers of nodes are used to thread the nodes together, i.e., to create a linked list.

Tree Navigation

  • A path in a tree is a sequence of nodes that connect from the root node to a particular node, i.e., it is a route through the tree to reach a specific node.

Test your knowledge on binary trees, including terminology, representations, traversals, and operations, as well as on binary search trees and their applications.

Make Your Own Quizzes and Flashcards

Convert your notes into interactive study material.

Get started for free
Use Quizgecko on...
Browser
Browser