File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Collection class offers constant- time performance for basic operations

 
Sathi Krishna
Ranch Hand
Posts: 51
Java
  • 0
  • 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: 20829
75
C++ Chrome Eclipse IDE Firefox Browser Java jQuery Linux VI Editor Windows
  • 0
  • 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
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic