This project is meant to help beginners understand and code Data Structures and Algorithms in C. This project strictly follows the book `Introduction to Algorithms` by Thomas H. Cormen. Any beginners strugling with Data Structures and Algorithms are highly recommended to follow the book. Most of the code is documented properly for beginner audiences to understand easily. Minimum utilities and libraries are used in case the targeted audience ins't familiar with them.
Read contributing guidelines in case you want to contribute to this project.
Algorithms have been mostly implemented in C++ and partially documented. The algorithms implemented are:
- Insertion Sort. (location: Algorithms.cpp, line on:[150-165])
- Heap Sort (location: Algorithms.cpp, line no:[331-342])
- Quick Sort (location: Algorithms.cpp, line no:[368-378])
- Randomized Quick Sort (location: Algorithms.cpp, line no:[360-366])
- Counting Sort (location: Algorithms.cpp, line no:[392-408])
- Merge Sort (location: Algorithms.cpp, line no:[410-467])
- Selection Sort (location: Algorithms.cpp, line no:[484-500])
- Bubble Sort (location: Algorithms.cpp, line no:[474-482])
- Linear Search (location: Algorithms.cpp, line no:[133-143])
- Binary Search (location: Algorithms.cpp, line no:[111-124])
- Maximum Subarry Problem solved using brute forse, devide and concour and linear methods. (location: Algorithms.cpp, line no:[582-691])
- Infix to Reverse Polish (postfix) using STACK in C (location: infix_to_postfix/main.c)
- Infix to Polish (prefix) using STACK in C (location: infix_to_prefix/main.c)
- Reverse Polish (postfix) to Polish (prefix) using STACK in C (location: postfix_to_prefix/main.c)
- Reverse Polish (postfix) to Infix using STACK in C (location: postfix_to_infix/main.c)
- Polish (prefix) to Reverse Polish (postfix) using STACK in C (location: prefix_to_postfix/main.c)
- Polish (prefix) to Infix using STACK in C (location: profix_to_infix/main.c)
All the algorithms will be fully documented and implemented in C soon!
All the Data Structures have been implemented in C. The implemented Data Structures are:
- Stack (fully documented) (C implementation: stack_as_static_array.c, C++ implementtation: stack/stack/headers/Stack.h)
- Queue (documented) (C implementation: queue_using_static_array.c, C++ implementtation: queue/queue/headers/Queue.h)
- Heap (documented) (location: Algorithms.cpp, line no:[168-342])
- Priority Queue (documented) (C implementation: priority_queue.c, C++ implementation: Algorithms.cpp, line no:[168-342])
- Circular Queue (undocumented) (location: circular_queue_uaing_static_array.c)
- Binary Search Trees (undocumented) (location: binary_tree.c)
- Doubly Linked List (fully documented) (location: doubly_linked_list.c)
- Direct Address Tables (undocumented) (location: direct_address_tables.c)
- Hash Tables (fully documented) (location: hash_tables.c)
Currently under devlopment, some of the Dynamic and Greedy Algoruthms have been implemented in this section. The implementations include:
- Fibonacci Series
- Rod Cutting Problem
- Matrix Chain Multiplication Problem
- Longest Common Subsequence Problem
- optimal substructure.
- Property of independence holds.
- Property of linearity holds.
- Choices hold both for subproblems and problems.
- overlapping subproblems.
- Optimal Substucture.
- Overlapping Subproblems.
- Reconstructing a optimal solution.
- Memoization for top-down approach.
- Characterize the stucture of an optimum solution.
- Recursively define the value of an optimum solution.
- Compute the value of optimum solution.
- Construct an optimal solution from computed information.
- Rod cutting Problem.
- Matrix Chain Multiplication.
- Shortest Path in unweighed directed graph.
- Longest Common Sub-Sequence.
- Longest Path in unweighed directed graph.
- Rod cutting with limit of cuts.
Please read the contributing guidelines if you wish to contribute!