https://github.com/ffflorian/double_linked_list
A Rust implementation of a double-linked list
https://github.com/ffflorian/double_linked_list
Last synced: about 1 year ago
JSON representation
A Rust implementation of a double-linked list
- Host: GitHub
- URL: https://github.com/ffflorian/double_linked_list
- Owner: ffflorian
- License: gpl-3.0
- Created: 2017-05-05T12:20:02.000Z (about 9 years ago)
- Default Branch: main
- Last Pushed: 2024-08-11T09:08:50.000Z (almost 2 years ago)
- Last Synced: 2025-02-04T20:44:28.180Z (over 1 year ago)
- Language: Rust
- Homepage:
- Size: 31.3 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
## double_linked_list
A linked list in which every element knows about its predecessor and its successor.
```
______ ______ ______
| | | | | | | | | | | |
| | | <---> | | <---> | | |
|_|__|_| |_|__|_| |_|__|_|
prev n next
```
### Usage
```rust
extern crate double_linked_list;
use double_linked_list::LinkedList;
use double_linked_list::ListElement;
let list = LinkedList::new();
let element = ListElement::new("hello");
```
### Testing
Use `cargo` for testing:
```bash
$ cargo test
```