How does `TreeSet` compare elements to maintain order?
`TreeSet` uses the natural ordering of elements (if they implement `Comparable`) or a custom comparator to compare elements and maintain order.
Well done! Youâ€™ve got that right. `TreeSet` uses either natural ordering or a comparator.
How does `TreeSet` handle a case where two elements are not comparable?