210 likes | 262 Views
This presentation is based on the quicksort Algorithm. This Quicksort in data structures tutorial explains sorting algorithms to help beginners learn quick sort. The video also covers practical demo for a better learning experience.<br><br>Learn more about Data Structures: https://www.simplilearn.com/data-structures-and-algorithms-article
E N D
Agenda Quick Sort
Agenda Quick Sort
Quick Sort Click here to watch the video
Agenda Quick Sort Introduction
Agenda Quick Sort Introduction Algorithm
Agenda Quick Sort Introduction Algorithm Implementation
Agenda Quick Sort Introduction Conclusion Algorithm Implementation
Introduction Quick sort is a highly efficient sorting algorithm and is based on partitioning of array of data into smaller arrays and then sort the two resulting subarrays in the same manner. This algorithm is quite efficient for large-sized data sets as its average and worst-case complexity are O(n2)
Introduction Quick sort is a highly efficient sorting algorithm and is based on partitioning of array of data into smaller arrays and then sort the two resulting subarrays in the same manner. This algorithm is quite efficient for large-sized data sets as its average and worst-case complexity are O(n2)
Introduction Quick sort is a highly efficient sorting algorithm and is based on partitioning of array of data into smaller arrays and then sort the two resulting subarrays in the same manner. This algorithm is quite efficient for large-sized data sets as its average and worst-case complexity are O(n2)
Algorithm We select a pivot
Algorithm This pivot will dissect the array in two sub-arrays then we will shift all smaller element to left.
Algorithm 6 9 2 3 5 Then we will again apply same operation for left subarray and take pivot like we did for main array
Algorithm 6 9 2 3 5 We will perform the same for right sub array as well.
Conclusion Quick sort follows the divide and conquer principle. Quick sort has average time complexity of O(n log n). All pivots should be selected in the same manner. Quick sort is an unstable sorting algorithm.