Table of Contents
This repository is dedicated to creating fundamental visual representations of various non-primitive data structures using Python. Each data structure will be visually depicted, accompanied by a link to a corresponding Medium article. These articles will provide an in-depth exploration of the major operations of each structure, supplemented with code snippets in Python and JavaScript.
A data structure is a data organization, management, and storage format that enables efficient access and modification. There are two types of data structures:
-
Primitive data structures - data structures that hold a single value (int, char, float, double, and pointer)
-
Non-primitive data structures - data structures that can hold several values. It is divided into two:
1. Linear - data is arranged in sequential manner, i.e, one element is connected to only one element in linear form (Arrays, Linked list, Stacks, and Queues).
2. Non-linear - data is arranged in a random manner, i.e, one element is connected to 'n' number of elements (Trees and Graphs).
The major operations that we will perform on each data structure include:
-
Searching: We will search for any element in the data structure.
-
Sorting: We will sort the elements of a data structure either in an ascending or descending order.
-
Insertion: We will insert the new element in the data structure
-
Updation: We will update the element, i.e., replace the element with another element.
-
Deletion: We will perform the delete operation to remove the element from the data structure.
To run this project locally, you'll need to follow these steps.
Make sure you have the following installed on your machine:
Clone this repository to your desired folder.
cd my-desired-folder
git clone [email protected]:tobuya/data-structures.git
cd data-structures
Create a virtual environment using venv module available in Python 3.x (Recommended)
-
Create a virtual environment
python -m venv desired-name
-
Activate the virtual environment
On Windows
desired-name\Scripts\activate
On Linux and macOS
source desired-name/bin/activate
Install the required dependencies with:
pip install -r requirements.txt
To generate the visualizations, execute the following command:
python <data-structure-name>.py
๐ค Thomas Obuya
- Add Data Structures section containing visualization and a Medium article link.
- Add other data structures visualization Python code
- Update the README documentation
- Add an assets folder containing all the data structures visualization
Contributions, issues, and feature requests are welcome!
Feel free to check the issues page.
If you like this project, please consider giving it a โญ.
You can also follow me on X/Twitter. Let's connect, share ideas, and grow together in our journey through the world of software development.
I extend my sincere gratitude to everyone contributing their valuable insights and expertise to enhance this project. Your thoughts and contributions are immensely appreciated and vital to further improving this project, so bring them on.
This project is MIT licensed.