This week's book giveaway is in the Android forum.
We're giving away four copies of Head First Android and have Dawn & David Griffiths on-line!
See this thread for details.
The moose likes Java in General and the fly likes time complexity in Collection classes Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Head First Android this week in the Android forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "time complexity in Collection classes" Watch "time complexity in Collection classes" New topic
Author

time complexity in Collection classes

jami siva
Ranch Hand

Joined: Oct 16, 2009
Posts: 66
Hi All,

How can we find time complexity in Collection classes.
I read some where the complexity of LinkedList is o(n) or o(1).
Even I don't know what is the above notation stands for.
Please any one share how to calculate complexity for searchning and sorting opertions. Even how do decide which one is best for particular situation.

I appreciate all your help.


Thanks,
Seetharaman Venkatasamy
Ranch Hand

Joined: Jan 28, 2008
Posts: 5575

jami siva wrote:
How can we find time complexity in Collection classes.

there is no special classes available in java. probably, you need to read introduction to algorithm book.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: time complexity in Collection classes
 
It's not a secret anymore!