Solitude & data structures
Just a little homage to CLRS's The big white book
Last updated
Just a little homage to CLRS's The big white book
Last updated
I am a big fan of the big white book of CLRS's, and other books like the practice of programming by Pike and Kernighan and the Wizard book. In general, you know it's crucial always to collect a lot of algorithms and data structure books. It's important to improve yourself to get more skills, following this context of the collector. I am sharing a little list of my open-source libraries, and each code snip has been written by love. Looking at the libraries, each source code uses pointers and dynamic allocation and always follows Valgrind tools to detect memory pitfalls and implement proper patch fixes. It's not a perfect code, but it is worth sharing.
The motivation for using pointers and dynamic allocation in a program is to improve its performance and efficiency. By using pointers, you can access and manipulate data directly in memory, which can be faster and more efficient than using other methods. Additionally, by using dynamic allocation, you can allocate memory for data at runtime, which can allow your program to use only as much memory as it needs instead of pre-allocating a fixed amount of memory that may not be fully utilized.
Another motivation for using pointers and dynamic allocation is to enable your program to work with data of varying sizes and types. By using pointers, you can create and manipulate data structures that can grow or shrink at runtime, which can help work with large or complex data sets. And by using dynamic allocation, you can create and manage objects that can be customized and configured at runtime, giving your program more flexibility and adaptability.
Overall, the use of pointers and dynamic allocation can make your program more efficient, more flexible, and more adaptable, which can be beneficial in a variety of situations.
So no more presentations. Meet the fortress of solitude, my compendium of C language libraries. A cool resource is each lib has resources to carry your custom payload between data flow. For a more professional view, I strongly recommend studying gnome lib. Yes, you can see a lot of data structure algorithms, but not in a simple way that follows this article on the fortress of solitude.
Ice Doubly linked list C library, you can carry your custom data in elements, insert and remove features, and other resources. https://github.com/CoolerVoid/Fortress-of-Solitude/tree/main/ice_doubly_linked_list
Ice n-ary tree is a C library to work with a Generic tree with resources to carry your custom data(n-ary, traversal, search, create, insert children/siblings, remove children, destroy trees) https://github.com/CoolerVoid/Fortress-of-Solitude/tree/main/ice_narytree
Ice Queue is an open-source C library to queue construction with dequeue. Enqueue resources have an option to carry your custom data. https://github.com/CoolerVoid/Fortress-of-Solitude/tree/main/ice_queue
Ice Stack is an open-source C library implemented using a singly linked list. You can carry your custom data to work with stacks. https://github.com/CoolerVoid/Fortress-of-Solitude/tree/main/ice_stack
Dynamic vector is an open-source C library https://github.com/CoolerVoid/Fortress-of-Solitude/tree/main/ice_vector
Arit_eval is an Arithmetic expression evaluator with anti-integer-overflow resources, using a pseudo-AST algorithm to solve. https://github.com/CoolerVoid/Fortress-of-Solitude/tree/main/arit_eval
It's all right. But why fortress of solitude? I always fall in deep solitude to write my codes, so you need attention when you implement an RB Tree or linked list. Anyway, you know the context in the following.
Please read README.md of each library to understand how to use it. If you have any doubts, send me an e-mail or create an issue.
All libraries of this repository don't have memory leaks. I tested each program with valgrind[1].
[1] - https://valgrind.org/
CLRS's The big white book https://en.wikipedia.org/wiki/Introduction_to_Algorithm
Thank you for reading this!
Cheers!