Binary Search Tree Demo

Notes: You can press number keys 0-9 to add leafs.

"In computer science, a binary search tree (BST), which may sometimes also be called an ordered or sorted binary tree, is a node-based binary tree data structure which has the following properties: [1] The left subtree of a node contains only nodes with keys less than the node's key. [2] The right subtree of a node contains only nodes with keys greater than the node's key. [3] Both the left and right subtrees must also be binary search trees."

Wikipedia