fragglet/c-algorithms logo

fragglet/c-algorithms

Free

A library of common data structures and algorithms written in C.

FreeFree tier
Type
Open Source

About fragglet/c-algorithms

The C programming language includes a very limited standard library compared to other modern languages. This project provides a collection of common computer science data structures and algorithms written in C. It is structured modularly, allowing developers to trivially copy individual .c and .h files into their own projects without library dependency hassles. Alternatively, the entire collection can be built as a shared library named libcalg. The code is licensed under the permissive ISC license (functionally identical to MIT/BSD), making it suitable for use in any project, whether proprietary or open source. The repository includes a README, documentation, and a website at fragglet.github.io/c-algorithms/. Topics include c, library, algorithm, and data-structures. The latest release (v1.2.0) was on April 26, 2015.

Key Features

Modular design: copy individual .c and .h files into any C project with no library dependency
Can also be built as a shared library named libcalg
Includes a wide range of common computer science data structures and algorithms
Licensed under the permissive ISC license (functionally identical to MIT/BSD)
Suitable for both proprietary and open source projects

Pros & Cons

Pros
  • Permissive ISC license allows use in any project without legal restrictions
  • Modular structure makes it easy to include only needed components
  • Covers many fundamental data structures and algorithms in one place
Cons
  • Last release (v1.2.0) was in April 2015, indicating limited recent maintenance
  • Documentation beyond the README and code comments is minimal
  • Limited to C language; not applicable to other programming environments

Best For

Adding common data structures (e.g., lists, trees, hash tables) to C projectsEducational reference for implementing algorithms in CAs a dependency for larger C software projects needing efficient data structure implementations