Skip to content
Algorithms and data structures for educational, demonstrational and experimental purposes.
Branch: master
Clone or download
Type Name Latest commit message Commit time
Failed to load latest commit information.
ands Typo in comment of the file fixed Oct 14, 2018
scripts Improve the change_making module's docs and tests added for that same… Aug 5, 2018
tests A few small fixes to the just pushed tests Aug 5, 2018
.coveragerc file removed from coverage results Apr 3, 2018
.gitignore In the previous commit and push, the tests were not actually pushed t… Aug 5, 2018
.travis.yml Added is_hash_table function Aug 20, 2017 Forgot to add other files Sep 28, 2017 Fixed info in README of tests Feb 2, 2017 A few things modified Aug 20, 2017 Removed redundancy. Supporting now only Python 3.5+ Sep 29, 2017 Fixed a few minor things Feb 19, 2017 Improve the change_making module's docs and tests added for that same… Aug 5, 2018

Algorithms and Data Structures (ands)

Python 3.5+ Build Status Coverage Status Codacy Badge Packagist


This project was created for personal use mostly while studying for an exam (starting in the month of June in 2015) of a previous course that I followed called Algorithms and Data Structures I decided to make it publicly available to use and modify, so that people with difficulties in understanding and applying these topics can take benefit from it.

I discourage every beginner from copying shamelessly the source code, but instead you should definitely give a chance to your brain and sense of challenge first! At the end, you will definitely feel a better and more serious programmer! If you really do not have any ideas on how to do something, try to read the comments next to each function and/or class (or even the code itself) that you are interested in. They are there for a reason!

Any suggestions to improve the code, or the design of an algorithm or data structure, or corrections are of course welcome. Feel free to open an issue.


In this repository, you will find data structures, such as binary-search trees, and algorithms that often work on (those) data structures. You will also find some algorithms related to some particular design paradigm, for example algorithms related to the greedy or dynamic programming design paradigms.

Notes, warnings and "philosophy"

  • This is a work in progress, don't expect to find here all the data structures and algorithms you're searching. Consider to contribute to the quality and size of the project.

  • Again, mistakes are possible, even if decent tests are starting to being done. You can find them under the folder tests. So, as the license says, this project is provided "as is", etc.

  • No optimisation has been done to any algorithm or data structure. The purpose of the implementations is just for exposition of the concepts!

  • My intent is to continue to contribute to this repository in my free time, and new data structures and algorithms will therefore be added.


For each module I always try not to forget to specify the specific references that I used to implement the particular concept exposed in that module.

Apart from those, the following are the references which I always keep an eye on:


There many useful resources around the web to help you (and me) understand how certain algorithms or data structures work.

One curated list that I found useful which points to a bunch of other resources is the following:

Other resources that may be useful:

You can’t perform that action at this time.