Skip to content

Implementation of Sorting algorithms in C (Beginner)

Notifications You must be signed in to change notification settings

saurabh73/sorting-algos

Repository files navigation

sorting-algos

Implementation of Sorting algorithms in C (Beginner)

Steps for Adding new Algorithm

  1. Add algorithm signature to sort_algo.h header file.
  2. Implement your algorithm with file name format <algo-name>_sort.c in algorithms folder, with same signature mentioned in Step 1. Make sure to include sort_algo.h.
  3. In file common/menu.c, increment the macro definition TOTAL_ALGOS. Also add Print statement at last with sorting Algorithm name.
  4. In main.c, add the new case in switch block, with same number presented in menu.c. Call your implemented sort array in the case statement.

Build

make

Run

./sorting_algorithms

output

Clean

make clean