Skip to main content

Posts

Featured

Quick Sort

Quick Sort
Quick Sort is another algorithm which uses the strategy of divide and conquer paradigm, it uses a similar strategy as that of merge sort, which includes division of the list into sub-lists and applying quick sort on them. Additionally Quick Sort is an important algorithm, and in basic sense it selects an element and places it at a place where the elements to the left are less than the selected element and the element to the right are greater than the selected elements.
The worst case time complexity of Quick Sort is O(n^2) while its Average case is Θ(nlogn).
Worst case in Quick Sort occurs when the elements which we are selecting , appears in sorted order dividing the list comparable to insertion sort.
Average case assumes that , the element selected will on an average divide the list in 2 almost equal parts thereby acting comparative to merge sort, thus the complexity nlogn.
fig.1
Fig.1 depicts the basic working of Quick Sort,( Selected Element == Blue ) i.e. The selected…

Latest posts

Improving search speed in Singly Linked List

Divide and Conquer Paradigm

Merge Sort

Insertion Sort

Bubble Sort

Sorting

Elevators Algorithm(LOOK)

Elevators Algorithm (SCAN)

Interval Scheduling

Flow Shop Scheduling Algorithm & CPP Code