项目作者: cleve

项目描述 :
Data structures
高级语言: Python
项目地址: git://github.com/cleve/data-structures.git
创建时间: 2019-11-04T14:58:57Z
项目社区:https://github.com/cleve/data-structures

开源协议:

下载


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:

  1. python3 cli_tree.py

Linked list

The list structure is under the linked_list directory. To use the interactive
CLI, you need to run:

  1. python3 cli_list.py

Hash Table

The hash structure is under the hash directory. To use the interactive
CLI, you need to run:

  1. 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:

  1. # -v to add more details, you can remove this arg.
  2. # Use python3 if you have both versions.
  3. python -m unittest discover tests -v