Skip to content

pl3onasm/CLRS

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

${\color{cadetblue}\text{CLRS: Data Structures}}$ ${\color{cadetblue}\text{and Algorithms}}$

${\color{peru}\text{Algorithms}}$

${\color{peru}\text{Data structures}}$

${\color{darkseagreen}\text{Notes}}$

The aim is to implement all the algorithms and data structures discussed in the textbook Introduction to Algorithms by Thomas H. Cormen, et al. The third edition of this textbook will be referred to as CLRS³, and the fourth edition as CLRS⁴. Folders usually contain several versions of the same algorithm or data structure, in accordance with the different pseudocode and explanations in the textbook.

In addition, you will also find other algorithms and data structures that are not discussed or merely referenced in the book. All implementations will be in C, and will follow the pseudocode—if available—in the textbook as closely as possible, unless this results in a less efficient or unnecessarily complex implementation. I strive to make the code as transparent and economical as possible, and have it reflect the underlying reasoning. Brief explanations and summaries of the algorithms and data structures will be added as well. Contrary to the textbook, I will always use zero-based indexing. I will also link to helpful videos that explain the concepts in a more visual way.

Please refer to the license if you wish to use any of the code in this repository. Any images were created using Photoshop. If you find any errors or have any suggestions, please let me know. Some of the solutions to the textbook's exercises can be found on this site.

Note that this is very much a work in progress. It simply takes time to develop and test all the code and write the explanations. Some of the code took me days to think through and implement. Currently, I am revising all the code and explanations. Updates will be made regularly. I will also add makefiles in the near future.

${\color{darkseagreen}\text{References}}$

CLRS³: Cormen, T. H., Leiserson, C. E., Rivest, R. L., & Stein, C. (2009). Introduction to algorithms. MIT press.
CLRS⁴: Cormen, T. H., Leiserson, C. E., Rivest, R. L., & Stein, C. (2022). Introduction to algorithms. MIT press.
CP: Halim, S., Halim, F., & Effendy, S. (2022) Competitive programming 4. Lulu Publishing.
JE: Erickson, J. (2019). Algorithms. Independent Publisher.