Skip to content

AmonRAyl/SortingAlgorithms

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 

Repository files navigation

SortingAlgorithms

This is a small project where I implemented various sorting algorithms. To test their efficiency, I used a random array consisting of 100,000 values and another array of 10,000,000 values to test the fastest algorithms.

Algorithms Implemented:

Insertion Sort

  • Time Complexity: O(n^2)
  • Worst Case: O(n^2)
  • Memory: 1

Quick Sort

  • Time Complexity: O(n log n)
  • Worst Case: O(n^2)
  • Memory: log n

Selection Sort

  • Time Complexity: O(n^2)
  • Worst Case: O(n^2)
  • Memory: 1

Merge Sort

  • Time Complexity: O(n log n)
  • Worst Case: O(n log n)
  • Memory: n

Bubble Sort

  • Time Complexity: O(n^2)
  • Worst Case: O(n^2)
  • Memory: 1

Tim Sort

  • Time Complexity: O(n log n)
  • Worst Case: O(n log n)
  • Memory: n