Hello All!
I prepared C code with basic coding interview data structures and algorithms:
https://github.com/aospan/coding_onepager/blob/main/coding_onepager.c
Code organized as a plain one page, so you can easily copy-paste it to any leetcode submission and save time (of course when the task is not related to these data structures or algorithms itself).
Note:
I try to keep code as simple as possible, so I skipped error checking, cleaning allocated memory, etc. in many places.
Bugfixes/pull requests/feature requests are welcome!
Hope this can help other developers. Happy coding!
P.S.
Implemented features:
Sort:
Insertion Sort
Quick sort
Heap sort
Pancake sort
Search:
Binary search
Hashtable
Stack
Queue
Graph (adjacency list graph)
Helpers:
power (no math.h required)
print array
swap elements
flip array
find max element