A

Admin • 830.13K Points
Coach

Q. Which class implements a set using a Red-Black tree?

  • (A) HashSet
  • (B) TreeSet
  • (C) LinkedHashSet
  • (D) EnumSet
  • Correct Answer - Option(B)
  • Views: 12
  • Filed under category Java
  • Hashtags: Java Set

Explanation by: Admin
TreeSet uses a Red-Black tree internally to maintain order.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.