This week's book giveaways are in the Refactoring and Agile forums.
We're giving away four copies each of Re-engineering Legacy Software and Docker in Action and have the authors on-line!
See this thread and this one for details.
Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Collection class offers constant- time performance for basic operations

 
Sathi Krishna
Ranch Hand
Posts: 51
Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Which collection class offers constant- time performance for basic operations

add(),remove(),contains() and size() ?

Please lemme know the info.

Thank You
Svk
 
Henry Wong
author
Marshal
Pie
Posts: 20907
76
C++ Chrome Eclipse IDE Firefox Browser Java jQuery Linux VI Editor Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It is actually easier if you don't think of this as a Java question....

Do you remember your "data structures" or "algorithms" course? Do you remember what type of structures can do stuff in O(1)?

Henry
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic