This repository contains a collection of Python implementations of fundamental and advanced algorithms and data structures. It is designed for general-purpose use, including problem-solving, academic learning, and technical interview preparation. The algorithms cover a broad range of topics, from classic data structures to modern techniques, and aim to provide both efficient solutions and clear code examples to enhance your understanding of algorithm design and optimization.
Ensure Python3 is installed.
To get started with the repository, follow these steps:
-
Clone the repository:
git clone https://github.com/byue/Algorithms.git cd Algorithms -
Install Dependencies (venv) and Run Unit Tests: Install dependencies and run unit tests:
make
Install can be done separately:
make install
Running unit tests can be done separately:
make test -
Clean up Build Artifacts: Delete build artifacts:
make clean
We welcome contributions to this project! If you'd like to contribute, follow these steps:
- Fork the repository and clone it to your local machine.
- Create a new branch for your feature or bug fix.
- Write tests for any new functionality or changes.
- Make sure all tests pass by running
make testbefore submitting your pull request. - Submit a pull request with a detailed explanation of your changes.
Please ensure your code follows the existing style and includes sufficient documentation.
This project is licensed under the MIT License. See the LICENSE file for more details.
By contributing to this repository, you agree that your contributions will be licensed under the MIT License.
The algorithms and data structures concepts in this repository were inspired by courses from the following institutions:
-
Princeton University Coursera Courses: These courses offer a deep dive into algorithms and data structures. See Algorithms, Part I and Algorithms, Part II for more details.
-
MIT OpenCourseWare: The Introduction to Algorithms course as well as the Design and Analysis of Algorithms course from MIT OpenCourseWare provided key insights and methodologies for this project.
-
University of Washington CSE 421: The CSE 421: Algorithms Lecture Notes served as another essential reference for the development of algorithmic techniques in this repository.
-
Introduction to Algorithms, Fourth Edition, by Thomas H. Cormen, Charles E. Leiserson, Ronald L. Rivest, and Clifford Stein. Published by The MIT Press in April 2022. ISBN: 978-0262046305. Link to MIT Press.