Can anyone give me references of a web site containing a summary of the main Java data structures, and their respective complexity in time (for some given operations like add, find, remove), e.g. Hashtable
s are O(1) for finding, while LinkedList
s are O(n). Some details like memory usage would be nice too.
This would be really helpful for thinking in data structures for algorithms.
Data Structures are the programmetic way of storing data so that data can be used efficiently. Almost every enterprise applicaton uses various types of data structures in one or other way.
A HashMap is a data structure that is able to map certain keys to certain values.
An ArrayList is a built-in data structure that uses a dynamic array to store its elements. In order to use this data structure, you must import java. util. ArrayList at the top of your program.
Is there a reason to think that Java's implementation is different (in terms of complexity) than a generic, language agnostic implementation? In other words, why not just refer to a general reference on the complexity of various data structures:
NIST Dictionary of Algorithms and Data Structures
But, if you insist on Java-specific:
Java standard data structures Big O notation
Java Collections cheatsheet V2 (dead link, but this is the first version of the cheatsheet)
The most comprehensive Java Collections overview is here
http://en.wikiversity.org/wiki/Java_Collections_Overview
I found very useful The Collections Framework page, expecially the Outline of the Collections Framework, where every interface/class is breeefly described. Unfortunately there's no big-O information.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With