Skip to content

Commit bd10f39

Browse files
author
Am0rfu5
committed
updated DATA_STRUCTS
1 parent 161087a commit bd10f39

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

DATA_STRUCTURES.md

+10-3
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,17 @@
11
# Data Structures
22

3+
!!!
34
For Rust specific visualization of the metadata for heap containers (e.g. Box, Vec, Rc, Arc, Cell) checkout https://docs.google.com/presentation/d/1q-c7UAyrUlM-eZyTo1pd8SZ0qwA_wYxmPZVOQkoDmH4/edit#slide=id.p
45

56
## Overview
67

7-
Eventually we expect to add links. For now, visit the [src](src/data_structures/) directory to see the progress on various data structures, including:
8+
Many of these data structures are implemented in Rust's standard library as collections ([std::collections](https://doc.rust-lang.org/std/collections/index.html)) or there are crates which are well vetted. There are still occasions where a requirement for extreme efficiency may lead to the need for custom implementation but that is out of scope. The goal of this section is to provide a high-level overview of the most common data structures and their use cases.
9+
10+
The [Rust docs](https://doc.rust-lang.org/std/collections/index.html) also cover much of the same ground and goes more in depth so each implementation is also linked to for further study. The Rust docs also provide a good overview of the [tradeoffs between the different types of collections](https://doc.rust-lang.org/std/collections/index.html#tradeoffs)
11+
12+
## Sequence Containers
813

9-
### Linear Structures (Sequence Containers)
14+
### Linear Structures
1015
- **Array**: Stores elements in a contiguous block of memory.
1116
- **Dynamic Array (ArrayList)**: Similar to an array but allows resizable storage.
1217
- **Linked List**: Consists of nodes with data and references to the next node in the sequence.
@@ -18,12 +23,15 @@ Eventually we expect to add links. For now, visit the [src](src/data_structures/
1823
- **Queue**: A FIFO (First In, First Out) data structure.
1924
- **Priority Queue**: Elements are removed based on priority, not just insertion order.
2025

26+
## Associative Structures
27+
2128
### Tree and Heap Structures
2229
- **Binary Tree**: A tree where each node has at most two children.
2330
- **Binary Search Tree (BST)**: A binary tree maintaining order among elements for efficient search.
2431
- **Balanced Trees**: Including AVL, Red-Black, and Splay trees.
2532
- **Heap**: A tree-based structure satisfying the heap property.
2633
- **B+ Tree**: A type of tree that maintains sorted data and allows searches, sequential access, insertions, and deletions in logarithmic time.
34+
- **Trie**: A tree-like structure for efficient retrieval of keys in a dataset of strings.
2735

2836
### Associative Structures
2937
- **Hash Table**: Maps keys to values, implementing an associative array.
@@ -35,7 +43,6 @@ Eventually we expect to add links. For now, visit the [src](src/data_structures/
3543
- **Graph Variants**: Includes directed, undirected, and weighted graphs.
3644

3745
### Advanced and Specialized Structures
38-
- **Trie**: A tree-like structure for efficient retrieval of keys in a dataset of strings.
3946
- **Skip List**: A probabilistic structure allowing fast search, insertion, and deletion.
4047
- **Union-Find (Disjoint Set)**: Keeps track of elements partitioned into disjoint subsets.
4148

0 commit comments

Comments
 (0)