Skip to content

Generic Data Structure Library for C language and a great way to learn pointer concept in c and c++

License

Notifications You must be signed in to change notification settings

arizansari80/c_generic_data_structure

Repository files navigation

c_generic_data_structure

The C Generic Data Structure Library

This will allow user to create Data Structure like Sets, Maps, Linked List, Stack, Queues etc in a generalized form.

The Sets Data Structure is implemented as an Ordered Set using a Binary Search Tree (BST) with log(n) times for all the operation insert, search

Same Way the Maps is also implemented as an Ordered Map using a BST.

Got the implement idea after using and analyze the working of the qsort function, that can be used to sort any kind of data type , whether it's a primitive data type or user defined datatype by taking a comparator function as one of it's argument an argument, this function can sort any type of data in any way. For reference of qsort see this https://en.wikipedia.org/wiki/Qsort

For Sample Program Visit https://github.com/arizansari80/c_generic_data_structure/blob/master/main.c

Explanation of Set Init Function and it's argument

Set.getSet(sizeof the elements, comparator function, display function)

For more of the sample and for any issues found please do comment in the section.