Skip to content

A-sleh/Sorting-algorithms-using-javaScript

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Some types of sorting algorithms

A number of sorting algorithms will be discussed and implemented in practice using JavaScript; the complexity level of each algorithm will be progressively increased.
  • Selection Sort (O(n²) best, average, and worst case):

    Selection sort is consistently O(n²) across all scenarios and is generally considered the least efficient of these three quadratic algorithms due to its non-adaptive nature.

  • Bubble Sort (O(n²) average and worst case; O(n) best case):

    This algorithm is generally inefficient for large lists, with a quadratic time complexity in the average and worst cases.

  • Insertion Sort (O(n²) average and worst case; O(n) best case):

    While O(n²) on average, it tends to perform better in practice than bubble or selection sort, especially on data that is already nearly sorted.

  • Merge Sort (O(n log n) average and worst case):

    Merge sort is consistently efficient in all cases, making it a highly predictable and fast algorithm for large datasets.

  • Quick Sort (O(n log n) average case; O(n²) worst case):

    Quick sort is very efficient on average. Its performance can degrade to O(n²) in the worst case, but

About

In this repo i will implement some of sorting algorithms useing javaScript

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published