Data structures
A data structure is a way of organizing and storing data so that it can be accessed and modified efficiently. Data structures are built on the abstract data type model. This model represents an interface that's employed by a user to perform operations on data.
It's important to choose the right data structure for your task. The following list shows the most common data structures:
- Arrays
- Linked lists
- Stacks
- Queues
- Sets
- Maps
- Hash tables
- Binary search trees
- Tries
- Binary heaps
- Graphs
Arrays
An array stores multiple items of the same type in one fixed-size sequence. It's easy to access and modify any element of an array by referencing its index. Arrays are an efficient way of reducing the number of variables and grouping them by logic and type. In Java and Kotlin, a multidimensional array is an array of arrays; it can be used to represent matrices or some figures in space. You can create arrays with different depth levels, but it's hard to manage arrays with more than three levels of depth...