Custom implementation of a Binary Search Tree in Java