• 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: 21414
84
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
 
Don't get me started about those stupid light bulbs.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic