Efficient Data Management: Binary Search Trees in Java