Binary Search Tree and AVL Tree Data Structures
Binary Search Tree and AVL Tree implementation using Binary Tree interface.
The following functions are available:
template "class T, class K" class BST/AVL
- void insertNode(T data, K key); # Insert a node, location of the node depends on its key
- void removeNode(T data, K key); # Remove a node
- int callLargestKeySum(int k); # Return the data sum of k nodes with the largest keys
- int callSmallestKeySum(int k); # Return the data sum of k nodes with the smallest keys
- void printLNR(); # Print the tree in inorder