A

Admin • 828.03K Points
Coach

Q. Which Set implementation provides constant-time performance for basic operations like add, remove, and contains?

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

Explanation by: Admin
HashSet provides constant-time performance for basic operations.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.