This public repository contains the CSharp source code for the algorithms and clients in the textbook Algorithms, 4th Edition by Robert Sedgewick and Kevin Wayne. The book surveys the most important computer algorithms currently in use and provides a full treatment of data structures and algorithms for sorting, searching, graph processing, and string processing.
This is an excellent resource to learning algorithms and data structures and this repository is part of my personal journey around this research field, set myself the challenge of implementing the 50 algorithms that every programmer should know.
The repository is organized in five topics represented by physical folders within src/ folder.
- Basics – Introduces a scientific and engineering basis for comparing algorithms. (in progress)
- Sorting – Classic sorting algorithms, insertion sort, mergesort, and quicksort.
- Searching – Symbol-table implementations, including binary search trees, red–black trees, and hash tables.
- Graphs – Graph-processing problems, including depth-first search, breadth-first search, minimum spanning trees, and shortest paths.
- Strings – Investigates specialized algorithms for string processing, including radix sorting, substring search, tries, regular expressions, and data compression.
Note: To the best of my knowledge, these solutions are correct. If you find anything incorrect feel free to create an issue or to open a pull request.
My main goal is to express the core algorithmic ideas in an elegant, simple and pedagogical manner, not pragmatic. I am not trying to save on space or obtain better perfomance than their counterparts in System. For Big-O time and space complexities of common algorithms used in .NET and Computer Science checkout the Big-O Algorithm Complexity Cheat Sheet.
To learn more about Big O notation, check out this video from HackerRank's Cracking The Coding Interview Tutorial with Gayle Laakmann McDowell:
This project has adopted the code of conduct defined by the Contributor Covenant to clarify expected behavior in our community.
Copyright © 2019–2022 by Ariel Lourenco.
This code is released under MIT.