This repository will contain three different types of data structures:
- Sentinel-based data structure
- Dynamic data structure using
malloc
for memory allocation - Linked data structure using pointers to point to the next element in the structure
The sentinel-based data structure is a type of data structure that uses a sentinel node to mark the beginning and end of the structure. The sentinel node is a special node that does not contain any actual data but is used as a marker to indicate the beginning or end of the structure. This type of data structure is often used in algorithms that need to search through a data structure, such as sorting algorithms or binary search.
The dynamic data structure is a type of data structure that uses malloc
to allocate memory dynamically. This means that the size of the data structure can be determined at run-time rather than at compile-time. This type of data structure is often used in situations where the size of the data to be stored is not known in advance.
The linked data structure is a type of data structure that uses pointers to link each element to the next element in the structure. Each element contains a data field and a pointer field that points to the next element in the structure. This type of data structure is often used in situations where the data needs to be accessed sequentially, such as in a queue or a linked list.