Skip to content

Instantly share code, notes, and snippets.

@JoeKarlsson
Last active June 15, 2020 01:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 3 You must be signed in to fork a gist
  • Save JoeKarlsson/4a76c79ea8b22b7e0063 to your computer and use it in GitHub Desktop.
Save JoeKarlsson/4a76c79ea8b22b7e0063 to your computer and use it in GitHub Desktop.
Five popular sorting algorithms implemented manually and visualized with DOM manipulation

Sorting Algorithms

For this assignment you will be responsible for the following:

  1. Create a module that implements each of the folowing sorting algorithms:
  2. Quick sort
  3. Bubble sort
  4. Merge sort
  5. Insertion sort
  6. Selection sort

Each module should be able to sort a randomized array of numbers.

  1. Create a README.md file and for each algorithm include the following:

  2. Explain to a five year old how the algorithm works (3-4 sentences max)

  3. Psuedo code for each sorting implementation

  4. In your own words, describe the performance of the alogirthm for the following cases: 1. Best case scenario 2. Worst case scenario

  5. Stretch Goal - Create a web app that visually sorts a randomized group via with DOM manipulation. Your web app should be able to be used based on user input. Your site doesn't need to be to fancy, here is an example of how it might look Sorting Algorithms Visualized. Note: Quick Sort and Merge Sort are difficult to visualize in the DOM. Do these last.

merge sort gif

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment