Skip to content

geethalladi/algorithms

Repository files navigation

Algorithms

Creating a python package containing implementation of some of the well known graph algorithms. This is mostly for educational / learning purposes and not yet read for production use. Readability and Correctness are given more weightage over run time performance. Use them with care.

It was a lot of fun !

Algorithm Design Manual Lecture Practice

This repository is a space for me to play around with the algorithms. Most of them I learnt by watching the Algorithm Design Manual Lectures by Steve Skiena. Hopefully, I can implement more around the following topics

Graph Algorithms

  • [X] Shortest Path
  • [X] Spanning Trees
  • [X] Breadth First Search
  • [X] Depth First Search
  • [X] Adjacency List representation

Dynamic Programming

Backtracking

Others

For the list of current TODO items grep for TODO in `adm.org` file.

Note on performance

Readability and correctness comes first. Performance and run time are not of paramount importance here. Though the implementation is correct and unit tested, it is not (yet) suited for Production use. Need to make some performance optimizations before using it in production.

My experience

Some of the solutions, would not fully qualify in the “leetcode” runtime. The “low hanging” optimization would be to delete all the logging statement and “merge” a few function definitions together to make it run fast.

Prerequisite

  • Install python version ‘3.9.x’
  • Create `python virtual environment` and install `pip`
  • Activate using `source ./venv/bin/activate`
  • Install packages using `make install`

Unit tests

  • Run using `make test`

Releases

No releases published

Packages

No packages published

Languages