Skip to content

Latest commit

 

History

History
27 lines (21 loc) · 1.57 KB

README.md

File metadata and controls

27 lines (21 loc) · 1.57 KB

Allowing students to view famous sorting algorithms in action, helping them undersand its underlying logic

Project Motivation

Algorithms become incresingly hard to comprehend the more complex they get. This website allows the user to view the progress of the following sorting algorithms:

Quick Sort

A very efficient divide and conquer sorting algorithm, that uses pivots in order to restructure the array by having the smallest elements to the left and largest on the right. Thus by depending where the pivot is chosen determines its overall run time.

Average run Time: O(nlogn) Worst run time: O(n^2) A benefit of quicksort other than its performance is that it sorts in place with out requiring extra memory unlike Merge Sort which is comparitively hard to implement in place.

Merge Sort

Another algorithm based on divide the array, sorting them and merging them.

Average run time: O(nlogn) Worst run time: O(nlogn) Memory used: O(n) In this implementation extra memory is used to store the auxillary array, which stores the final sorted array of the arrays to be merged.

Bubble Sort

An in-effcient but easy to implement sorting algorithm which swaps adjacent entries until they are in the right position. This can be seen in the website as the larger array elements 'bubbling' to the right of the array, hence the name ...

Average run time: O(n^2)

Insertion Sort:

A simple yet inefficient algorithm which inserts each element of the array to its right position one element at a time

Average run time: O(n^2)