Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Some ADT:s - written in C
C Makefile C++
Latest commit cb3d24b @dale48 Edited link in
Failed to load latest commit information.
demos Version 0.51..
.gitignore First commit of all initial files... Edited documentation:
Doxyfile Major update - graph algorithms added, EU City Criss Cross added.
README.dox Edited documentation: Edited link in
UNLICENSE First commit of all initial files...
algo.c Version 0.51..
algo.h Version 0.51..
avltree.c Version 0.51..
avltree.h Version 0.51..
bitree.c Version 0.51..
bitree.h Version 0.51..
chashtbl.c Version 0.51..
chashtbl.h Version 0.51..
cslist.c Version 0.51..
cslist.h Version 0.51..
dlist.c Version 0.51..
dlist.h Version 0.51..
doxygen.txt Version 0.51..
graph.c Version 0.51..
graph.h Version 0.51..
heap.c Version 0.51..
heap.h Version 0.51..
ohashtbl.c Version 0.51..
ohashtbl.h Version 0.51..
pqueue.c Version 0.51..
pqueue.h Version 0.51..
queue.c Version 0.51..
queue.h Version 0.51..
set.c Version 0.51..
set.h Version 0.51..
slist.c Version 0.51..
slist.h Version 0.51..
stack.c Version 0.51..
stack.h Version 0.51..
todo.txt Edited todo.txt
utils.c Version 0.51..
utils.h Version 0.51..

Project "LevAWC"


This project covers some basic Dynamic Data Structures implemented as pure, generic ADT:s, coded in ANSI C. Makefiles for building a library, both for Windows/Linux are included. You can also download a tarball to build/install the library from source, under Linux/Unix. Primarily for educational purposes - but the project can, of course, be useful in other contexts, as well. Original source code was written by Kyle Loudon - in his book Mastering Algorithms with C - published at O'Reilly Company. I have rewritten and extended some minor parts of the original source code. Finally, I want to thank Kyle and O'Reilly for giving me permisson to publish this code here at GitHub.


Kyle Loudon - and me.


see file


see file "UNLICENSE" above.


The project documentation can be found here.

Project webpage:

In case you want to regenerate the documentation locally - on your box:

Clone (or download zipfile of) this project, install Doxygen - and finally run command: doxygen - from the command prompt - when standing in the top-most directory of your clone. Then point your browser to the file index.html in the the new subdirectory html - recently created by this command.


In the demos subdirectory you will find some simple demos (demo01.c, demo02.c, demo03.c, ...) - using the ADT containers. You can build these yourself - together with a complete, single library (liblevawc.a/levawc.lib) of all the ADT:s - by simply using the enclosed makefiles in this directory, like this:

  • linux.mak - uses the native gcc compiler in Linux. Command: make -f linux.mak
  • mingw32.mak - uses Mingw32 gcc Compiler in Win32 - under a native DOS Shell.
    Command: mingw32-make -f mingw32.mak
  • msys32.mak - uses the Mingw32 gcc Compiler in Win32 - under the MSYS Shell.
    Command: make -f msys32.mak
  • vcwin32.mak - uses MS Visual C compiler in Win32. Command: nmake -f vcwin32.mak

Another way, to build the library and the demos, is to download a GNU Tarball - if you are sitting on a UNIX/Linux box or if you have Cygwin or MSYS/MinGW installed - on Windows. Decompress the tarball - enter the root directory of the unpacked tarball - and then execute the usual commands for GNU Tarballs: ./configure [--prefix=...], make and finally - [sudo] make install - if you want to install. The demos are created just where you are - ready to run - and the library and header-files are installed on your system.

The demos are trying to test and show most of the public interface of the ADT:s - accordingly:

  • demo01.c - testing/showing Singly-linked List ADT..
  • demo02.c - testing/showing Doubly-linked List ADT..
  • demo03.c - testing/showing Stack and Queue ADT..
  • demo04.c - testing/showing Chained Hash Table ADT..
  • demo05.c - testing/showing Heap and Priority Queue ADT..
  • demo06.c - testing/showing Binary Search Tree ADT..
  • demo07.c - testing/showing AVL Tree ADT..
  • demo08.c - testing/showing Circular, Singly-linked List ADT..
  • demo09.c - testing/showing Set ADT..
  • demo10.c - testing/showing Open-addressed Hash Table ADT..
  • demo11.c - testing/showing basic Graph ADT editing, BFS(Breadth-First-Search) - and DFS(Depth-First-Search)..
  • demo12.c - testing/showing interactive Graph editing..
  • demo13.c - testing/showing Graph Algorithms, such as MST(=Minimal Spanning Tree), DSP(=Dijkstra's Shortest Path) and TSP(=Traveling Salesman Path)..
  • demo14.c - a more extensive Graph ADT application, using Dijkstra's Shortest Path algorithm. A (distance-low-cost) criss-cross flight within EU.

All demos are tested on both Windows and Linux. Tracing for memory leaks was done with Valgrind, Linux.

Something went wrong with that request. Please try again.