constructors:
BST(); // Compare elements using their natural order
BST(Comparator comparator)
Hint: You need to add a data field for Comparator in the BST class as follows:
The lambda expression gives the default comparator using a natural order. You
need to use comparator c to replace e.compareTo(anotherElement) with
c.compare(e, anotherElement) in Listing 25.4.
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here