In this repository I am implementing the Data Structures and Algorithms I have learnt from scratch with C/C++
.
Dynamic Array
inC++
astemplate class
Singly Linked
List withouttail
inC
Singly Linked
List withtail
inC++
astemplate class
Stack
with mySingly Linked List
inC++
astemplate class
Queue
with mySingly Linked List
inC++
astemplate class
Priority Queue
(Max heap) with myDynamic Array
inC++
astemplate class
. The implementation is a bit messy as I am assuming the user has provided only an overload to< operator
for the custom class. I am studying to find elegent way to handle this.Binary Search Tree
inC++
astemplate class
Singly Linked List
,Stack
,Queue
inpython
- Marge Sort within Singly Linked List class.
- Selection Sort tamplate function with custom compare function support.
template <class T> void selection_sort(vector<T> &a, int begin_index, int end_index, bool(*compare_function)(T, T) = less_then); template <class T> void selection_sort_recursive(vector<T> &a, int begin_index, int end_index, bool (*compare_function)(T, T) = less_then);
- Bouble Sort tamplate function with custom compare function support.
template <class T> void bouble_sort(vector<T> &a, int begin_index, int end_index, bool(*compare_function)(T, T) = less_then); template <class T> void bouble_sort_recursive(vector<T> &a, int begin_index, int end_index, bool (*compare_function)(T, T) = less_then);
- Insertion Sort tamplate function with custom compare function support.
template <class T> void insertion_sort(vector<T> &a, int begin_index, int end_index, bool(*compare_function)(T, T) = less_then); template <class T> void insertion_sort_recursive(vector<T> &a, int begin_index, int end_index, bool (*compare_function)(T, T) = less_then);