Introduction
This project is a collection of common data structures and sorting algorithms implemented in C. It was developed as part of the Data Structures course at UFC (Federal University of Ceará) - Sobral, taught by Professor Jarbas Joaci de Sá in 2017.2. Source: github.com.
The main goal of this repository is to provide a simple and clear implementation of these data structures and algorithms, as well as to serve as a learning resource for students and developers.
Data Structures
The following data structures are implemented in this project:
- Singly Linked List: A linear data structure where each element is a separate object. Each element (we will call it a node) of a list is comprising of two items - the data and a reference to the next node.
- See header file: src/list/single/list.h
- Stack: A linear data structure which follows a particular order in which the operations are performed. The order may be LIFO(Last In First Out) or FILO(First In Last Out).
- See header file: src/stack/stack.h
- Queue: A linear structure which follows a particular order in which the operations are performed. The order is First In First Out (FIFO).
- See header file: src/queue/queue.h
- Binary Tree: A tree data structure in which each node has at most two children, which are referred to as the left child and the right child.
- See header file: src/tree/binary-tree.h
Sorting Algorithms
The following sorting algorithms are implemented in this project:
- Bubble Sort: A simple sorting algorithm that repeatedly steps through the list, compares adjacent elements and swaps them if they are in the wrong order.
- Insertion Sort: A simple sorting algorithm that builds the final sorted array (or list) one item at a time.
- Merge Sort: An efficient, general-purpose, comparison-based sorting algorithm.
- Quick Sort: An efficient sorting algorithm, serving as a systematic method for placing the elements of an array in order.
- Heap Sort: A comparison-based sorting algorithm. Heapsort can be thought of as an improved selection sort.
See header file for all sorting algorithms: src/sort/sort.h
Author
Manoel Vilela