Jared Jared - 1 month ago 23
Java Question

Big-O summary for Java Collections Framework implementations?

I may be teaching a "Java crash-course" soon. While it is probably safe to assume that the audience members will know Big-O notation, it is probably not safe to assume that they will know what the order of the various operations on various collection implementations is.

I could take time to generate a summary matrix myself, but if it's already out there in the public domain somewhere, I'd sure like to reuse it (with proper credit, of course.)

Anyone have any pointers?

Answer

This website is pretty good but not specific to Java: http://bigocheatsheet.com/

A copy of the original link in this answer can be found at https://github.com/benblack86/java-snippets/blob/master/resources/java_collections.pdf

The website hosting the original links for Java's big-O summary has gone offline. You can still find them at the web archive:

http://web.archive.org/web/20110227091351/http://www.coderfriendly.com/2009/05/12/java-collections-cheatsheet/

http://web.archive.org/web/20110626160836/http://www.coderfriendly.com/wp-content/uploads/2009/05/java_collections_v2.pdf