Worof / sorting_algorithms

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Sorting Algorithms Project

Description

This repository contains implementations of various sorting algorithms. The goal of this project is to understand and apply sorting algorithms in the C programming language, following specific coding standards and guidelines.

Algorithms Implemented

  • Bubble Sort
  • Insertion Sort
  • Selection Sort
  • Quick Sort

Files in the Repository

  • 0-bubble_sort.c: Implementation of the Bubble Sort algorithm.
  • 0-O: File containing the time complexities of the Bubble Sort algorithm.
  • sort.h: Header file with all the function prototypes and data structure definitions.
  • `1-insertion_sort_list.c'
  • 1-O
  • 2-selection_sort.c
  • 2-O
  • 3-quick_sort.c

Compilation

All files are compiled on Ubuntu 20.04 LTS using gcc with the options -Wall -Werror -Wextra -pedantic -std=gnu89.

To compile an algorithm, use: gcc -Wall -Wextra -Werror -pedantic -std=gnu89 [file_name].c -o [output_name]

Usage

Each sorting algorithm can be tested with the following steps:

  1. Clone the repository: git clone [repository_link]
  2. Navigate to the repository: cd sorting_algorithms
  3. Compile the files (as shown above)
  4. Run the compiled program: ./[output_name]

Coding Style

All C files are written in Betty coding style. For more information, see Betty coding style.

About


Languages

Language:C 100.0%