Understanding Sorting Algorithms (with Examples in Java)
Chinonso Ikewelugo

Chinonso Ikewelugo @chinonsoike

About: Software Engineer

Location:
Iowa, United States
Joined:
Dec 25, 2021

Understanding Sorting Algorithms (with Examples in Java)

Publish Date: Jan 17
3 0

Sorting is used to rearrange elements in a list in a specified order. For instance, we might want to sort this list in ascending order:

Image description

A sorting algorithm is used to carry out the process of sorting.

Different Sorting Algorithms

There are several different sorting algorithms in use today. A few we will look at are:

  1. Bubble Sort
  2. Selection Sort
  3. Insertion Sort
  4. Merge Sort
  5. Quick Sort

Efficiency of Sorting Algorithms

We can determine the efficiency of sorting algorithms by checking their time and space complexities.

Time Complexity:

This refers to the amount of time taken for the algorithm its execution with respect to the input. It can be represented in many forms, but the most common is using the Big O notation.

Space Complexity:

This refers to the amount of memory used by the algorithm to complete its execution. It can also be represented using the Big O notation.

Comments 0 total

    Add comment