Skip to content
Jianping-DuanPublic

About

A collection of classic algorithms and data structures implemented in C, covering sorting, searching, trees, heaps, hash tables, graph algorithms, and string processing.

Topics

Resources

Stars

5 stars

Watchers

1 watching

Forks

Repository files navigation

Algorithms and Data Structures in C

A collection of classic algorithms and data structures implemented in C, covering fundamental data structures, sorting and searching algorithms, tree-based structures, graph algorithms, and string processing.

Overview

This project provides practical implementations of commonly used algorithms and data structures in C. It covers a broad range of topics, from basic linear data structures to advanced search trees, heaps, hash tables, graph algorithms, and string-matching techniques.

The project is organized into separate modules, each focusing on a particular category of algorithms or data structures. This structure makes it easier to explore individual implementations and understand how different approaches are organized in code.

Source Roadmap

Directory Description
common Common modules shared across the project
utils Utility functions and supporting modules
linearlist Linked lists, stacks, and queues
sort Classic sorting algorithms
sequentialsearch Sequential search implemented using linked lists
binarysearch Binary search algorithms
searchtree Binary search trees, red-black trees, AVL trees, splay trees, and B+ trees
heap Binary heaps, binomial heaps, Fibonacci heaps, and pairing heaps
hashtable Hash tables using linear probing and linked-list-based collision handling
skiplist Skip lists
graphs Union-find, directed and undirected graphs, minimum spanning trees, shortest paths, Eulerian graphs, and bipartite graphs
strings String sorting, tries, ternary search tries, and string-matching algorithms
searchperf Search performance comparisons involving singly linked lists, skip lists, red-black trees, and splay trees
include Header files
lib Static library generated during compilation
bin Executable files generated during compilation

Build and Platforms

The project uses Makefiles to organize the build process and generate the corresponding executables and static library.

The project has been tested on the following 64-bit environments:

  • FreeBSD
  • Rocky Linux
  • Cygwin

The Makefile configuration follows BSD-style conventions. When building the project on GNU/Linux or Cygwin, you may need to adjust the build configuration to suit the tools and environment available on your system.

License

This project is licensed under the BSD 3-Clause License. See LICENSE for details.

About

A collection of classic algorithms and data structures implemented in C, covering sorting, searching, trees, heaps, hash tables, graph algorithms, and string processing.

Topics

Resources

Stars

5 stars

Watchers

1 watching

Forks

Contributors

Languages