Skip to content

This repository aims to combine all(eventually) sorting algorithms into one piece of code as a quick refresh for beginners and experts. It also measure the time taken by each sorting algorithm function.

License

Notifications You must be signed in to change notification settings

dipak140/Sorting_Algorithms

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 

Repository files navigation

Sorting_Algorithms

This repository aims to combine all (eventually) sorting algorithms into one piece of code as a quick refresher for beginners and experts. It also measures the time taken by each sorting algorithm function.

To begin with, the following sorting algorithms have already been added, and more can be added.

  1. Selection Sort - (Average: O(n2), Worst: Average: O(n2))
  2. Insertion Sort - (Average: O(n2), Worst: Average: O(n2))
  3. Bubble Sort - (Average: O(n2), Worst: Average: O(n2))
  4. Quick Sort - (Average: O(nlogn), Worst: Average: O(n2))
    • Paritions array into two based off of a pivot index. One holds values less than pivot, the other holds values higher than pivot. Then recursively sorts the two arrays.
    • https://youtu.be/kPRA0W1kECg?t=40

How to Build/Run?

On Linux/Mac, use g++ sortOfAllSort.cpp -o sortOfAllSort && .\sortOfAllSort On Windows, use Visual Studio to run the file. Alternatively, install g++ and use the above command.

About

This repository aims to combine all(eventually) sorting algorithms into one piece of code as a quick refresh for beginners and experts. It also measure the time taken by each sorting algorithm function.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages