This document outlines functions to implement for a Tree and Binary Search Tree (BST) data structure. For the Tree, it lists functions for node insertion and deletion, various traversals, searching, finding height/diameter, mirroring, and checking balance. For the BST, it lists functions for node insertion and deletion, level order printing, traversals, searching, checking validity, finding successors/predecessors, printing paths, and finding min/max values. The document provides links to tutorials on implementing these functions for a Tree and BST.
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0 ratings0% found this document useful (0 votes)
26 views1 page
Basic Level Questions
This document outlines functions to implement for a Tree and Binary Search Tree (BST) data structure. For the Tree, it lists functions for node insertion and deletion, various traversals, searching, finding height/diameter, mirroring, and checking balance. For the BST, it lists functions for node insertion and deletion, level order printing, traversals, searching, checking validity, finding successors/predecessors, printing paths, and finding min/max values. The document provides links to tutorials on implementing these functions for a Tree and BST.
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1
TREE
Basic Level Questions:
• Create a class Tree consisting of 3 members (data, left pointer and right pointer) , including all these functions: o Insertion of Node o Deletion of Node o Inorder Traversal (Recursive and Iterative) o Preorder Traversal (Recursive and Iterative) o Postorder Traversal (Recursive and Iterative) o Level Order Traversal o Reverse Level Order traversal o Searching of Value o Height of tree o Diameter of Tree o Mirror of Tree o Check tree is balanced or not o Find minimum value in tree o Find maximum value in tree [Follow here: https://www.geeksforgeeks.org/binary-tree-data-structure/ ]
• Create a class BST(Binary Search Tree) consisting of 3 members (data, left pointer and right pointer) , including all these functions: o Insertion into BST o Deletion from BST o Level order print o Traversal(inorder , preorder and postorder) o Searching a value in BST o Check if is BST or not o Find inorder successor and inorder predecessor o Print all root node to leaf node paths o Find min and max value in BST [Follow here: https://www.geeksforgeeks.org/binary-search-tree-data-structure/ ]