17 lines
607 B
Markdown
17 lines
607 B
Markdown
# 07 — Struktury Danych (Data Structures)
|
|
|
|
## Zakres
|
|
* Własny stos generyczny `Stack<T>` na bazie `Vec<T>`
|
|
* Kolejka `Queue<T>` na bazie `VecDeque<T>`
|
|
* Jednokierunkowa lista łączona `LinkedList<T>` z użyciem `Option<Box<Node<T>>>` (świetny trening dla `Option::take()` i ownershipu na stercie)
|
|
|
|
## Zadania (`src/lib.rs`)
|
|
1. Zaimplementuj `Stack<T>`: `new`, `push`, `pop`, `peek`, `is_empty`.
|
|
2. Zaimplementuj `Queue<T>`: `new`, `enqueue`, `dequeue`, `len`.
|
|
3. Zaimplementuj `LinkedList<T>`: `new`, `push_front`, `pop_front`.
|
|
|
|
## Uruchomienie testów
|
|
```bash
|
|
make test PKG=core07-data-structures
|
|
```
|