this is a binary search tree in c++ you can choose a key-value type to build the tree
binary search tree