Static Binary trees exercises in C Programming in C
Statically implemented Binary Tree: Write a recursive function $\texttt{int max$\_$rec(Btree B, int root$\_$index)}$ that returns the maximum element in a binary tree statically implemented rooted at index $\texttt{root$\_$index}$.Example: Consider the following Binary tree and its r...
Maximum width and depth: We define the maximum width of a BT as the maximum number of nodes located at the same level, and the maximum depth as the longest path from the root to a leaf.
Write a function that computes the maximum width of a dynamically implemented BT.
Wri...
Statically implemented Complete Binary Tree: A binary tree is called complete if all its non-leaf nodes have two children.
Write a function that tests whether a binary tree statically implemented is complete....
Static Binary Search Trees: A Binary Search Tree (BST) of whole integers can be represented by an array where the root is located at 0 and the contents of the remaining nodes correspond to the course in width of the tree. i.e. every node has two locations for its left and right...