Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Standard implementation of a linked list in C [duplicate]

Tags:

c

Is there something like a standard implementation of a list in C? I am not finding anything in the standard libraries.

Do you have a recommendation of a c library that implements standard data types like list, map etc.? I am searching for a slim one-file solution.

like image 461
Erik Avatar asked Mar 14 '12 18:03

Erik


2 Answers

Many unix systems have a few different implementations in sys/queue.h

like image 166
Erik Ekman Avatar answered Nov 15 '22 07:11

Erik Ekman


The GLib library contains plenty of data structures including linked lists and, for maps, hash tables and balanced binary trees. I'm unsure whether you will consider it “slim”, though.

like image 23
Pascal Cuoq Avatar answered Nov 15 '22 09:11

Pascal Cuoq