Hashtables
Data structureJava: Hashmap (Hashtable class is deprecated).
C#: Dictionary (Hashtable class is deprecated too).
/!\ A hash table does not guarantee that the order will remain constant over time.
Hashmap in Java
final Map<String, String> myLookupTable…
Arrays
Data structureA way of organizing data that enables efficient storage, retrieval, and use. An array is just a sequence of elements stored linearly.
See Contiguous allocation.
Languages such as C# and Java have fixed-length arrays, not Python though.
Arrays…
Abstract datatype
Data structureThe best simple definition I found is from Cracking the Coding Interview by Gayle Laakmann McDowell:
"An abstract data type is defined by its behavior (its operations).
The underlying implementation can vary.
You could implement a priority…
Types of data structures
Data structureA data structure is a way of organizing data that enables efficient storage, retrieval, and use.
Linear vs Non-Linear
Linear Data Structures
A data structure is said to be linear if its elements are arranged in a linear sequence like in an…
Linked lists
Data structureSome of the screenshots here come from the author of this best seller book.
Java: LinkedList (which is a Doubly-linked list implementation)
C#: LinkedList (which is a doubly-linked list too)
Thinking of a linked list as a list can be a bit…