Skip to content

DheemanthBhat/python-data-structures-algorithms

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

80 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

python-data-structures-algorithms

1 Introduction

1.1 Summary

  1. This repository contains implementation for Data Structures and Algorithms in Python programming language.
  2. Goal of this implementation is to use language specific features like Dataclasses, Generators, Function tools, Closures etc.
  3. This implementation is based on Udemy course Python Data Structures & Algorithms + LEETCODE Exercises by Scott Barrett.

Note:
Not optimized for production environment.

1.2 Index

This repository covers following data structures and algorithms:

1.2.1 Data Structures

  1. Singly Linked List
  2. Doubly Linked List
  3. Stack
  4. Queue
  5. Binary Search Tree
  6. Hash Table
  7. Graph
  8. Heap

1.2.2 Algorithms

  1. Bubble Sort
  2. Selection Sort
  3. Insertion Sort
  4. Merge Sort
  5. Quick Sort
  6. Tree Traversal

1.2.3 Others

  1. Bubble sort vs. Selection sort vs. Insertion sort vs. Quick Sort

1.3 Technologies

  1. Python: Programming language (version >= 3.12).
  2. Libraries:
    1. prettytable: Python library used for displaying Hash Table.
    2. networkx: Python library used for displaying Graphs.

2 Setup

STEP 1: Clone repository

Clone this repository and traverse to the project folder using below commands:

git clone https://github.com/DheemanthBhat/python-data-structures-algorithms.git
cd python-data-structures-algorithms

STEP 2: Setup virtual environment

Create and activate virtual environment.

Why virtual environment?

This project is using libraries for displaying data structures. These libraries have dependencies that can conflict with your local python setup. To avoid any unintended behavior install the libraries and their dependencies in a Virtual environment.

Windows

python -m venv .venv
.venv\Scripts\activate

Linux

python -m venv .venv
source .venv/bin/activate

STEP 3: Install python packages

pip install -r requirements.txt