Java standard data structures Big O notation


I took only the “important” stuff from this great post

collectionOnotaion

About these ads

2 thoughts on “Java standard data structures Big O notation

  1. Pingback: PROG Java vraagje - Pagina 2 - 9lives - Games Forum

  2. The remove operation for LinkedList is generally O(n), not O(1), because the LinkedList needs to seek to the element before it can remove that element from the list. Reading this cheat sheet, it’s a bit ambiguous because at first I thought it said remove(O), as in remove(Object o)… but in reality, this is remove(0), as in removing the first element at index 0 (zero) of the LinkedList.

    On the page with the updated cheat sheet, this was discussed.

    http://www.coderfriendly.com/2009/05/23/java-collections-cheatsheet-v2/

    I’d suggest using a better font. Then again, I’d also suggest that general remove() behavior is more useful to know than the behavior of remove(0) which is a special case.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s