https://github.com/cleve/data-structures
Data structures
https://github.com/cleve/data-structures
binary-search-tree binary-tree data-structures hash linked-list trees
Last synced: 10 months ago
JSON representation
Data structures
- Host: GitHub
- URL: https://github.com/cleve/data-structures
- Owner: cleve
- Created: 2019-11-04T14:58:57.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2020-07-27T00:57:59.000Z (over 5 years ago)
- Last Synced: 2025-03-04T14:49:21.330Z (about 1 year ago)
- Topics: binary-search-tree, binary-tree, data-structures, hash, linked-list, trees
- Language: Python
- Size: 35.2 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Data Structure
Data structures are written in Python3. You can find the most common structures,
with a friendly CLI for each one. The structures are separated into
packages that allow you to use/include it for your particular purpose.
## Trees
The tree structures are under the **trees** directory. To use the interactive
CLI, you need to run:
```python
python3 cli_tree.py
```
## Linked list
The list structure is under the **linked_list** directory. To use the interactive
CLI, you need to run:
```python
python3 cli_list.py
```
## Hash Table
The hash structure is under the **hash** directory. To use the interactive
CLI, you need to run:
```python
python3 cli_hash.py
```
The current hash function is based in the simple length of the value provided. To solve collisions
a linked list is implemented for the hash involved.
## DEV
In every main class there is a DEBUG variable, setting it to True, you will be able to
see extra information in the CLI.
## Unittest
Execute the next command in the root directory:
```sh
# -v to add more details, you can remove this arg.
# Use python3 if you have both versions.
python -m unittest discover tests -v
```