Data Structures & Algorithms

sorting Algorithm

Time Complexity:
O(n2)

Space Complexity:
O(1)

Description:
Bubble sort is a simple sorting algorithm that works by repeatedly swapping adjacent elements if they are in the wrong order.

Bubble Sort

sorting Algorithm

Time Complexity:
O(n2)

Space Complexity:
O(N)

Description:
Quick Sort is a sorting algorithm which uses divide and conquer technique. In quick sort we choose an element as a pivot and we create a partition of array around that pivot. by repeating this technique for each partition we get our array sorted

Quick Sort

/algos/bubble-sort.png

sorting Algorithm

Time Complexity:
O(n2)

Space Complexity:
O(N)

Description:

Merge Sort

/algos/bubble-sort.png

sorting Algorithm

Time Complexity:
O(n2)

Space Complexity:
O(N)

Description:
Quick Sort is a sorting algorithm which uses divide and conquer technique. In quick sort we choose an element as a pivot and we create a partition of array around that pivot. by repeating this technique for each partition we get our array sorted

Insertion Sort

/algos/bubble-sort.png

sorting Algorithm

Time Complexity:
O(n2)

Space Complexity:
O(N)

Description:
Quick Sort is a sorting algorithm which uses divide and conquer technique. In quick sort we choose an element as a pivot and we create a partition of array around that pivot. by repeating this technique for each partition we get our array sorted

Selection Sort

/algos/bubble-sort.png