Divide-and-conquer algorithms | Comparison sorts | Sorting algorithms

Quicksort

Quicksort is an efficient, general-purpose sorting algorithm. Quicksort was developed by British computer scientist Tony Hoare in 1959 and published in 1961, it is still a commonly used algorithm for sorting. Overall, it is slightly faster than merge sort and heapsort for randomized data, particularly on larger distributions. Quicksort is a divide-and-conquer algorithm. It works by selecting a 'pivot' element from the array and partitioning the other elements into two sub-arrays, according to whether they are less than or greater than the pivot. For this reason, it is sometimes called partition-exchange sort. The sub-arrays are then sorted recursively. This can be done in-place, requiring small additional amounts of memory to perform the sorting. Quicksort is a comparison sort, meaning that it can sort items of any type for which a "less-than" relation (formally, a total order) is defined. Most implementations of quicksort are not stable, meaning that the relative order of equal sort items is not preserved. Mathematical analysis of quicksort shows that, on average, the algorithm takes comparisons to sort n items. In the worst case, it makes comparisons. (Wikipedia).

Quicksort
Video thumbnail

Intersection of a Plane and a Line

Quickstart for Desktop Version Example 5: Intersection of a Plane and a Line

From playlist Quickstart for Desktop

Video thumbnail

Intersection of a Plane and a Line

Quickstart for Web and Tablet App Example 5: Intersection of a Plane and a Line

From playlist Quickstart for Web and Tablet App

Video thumbnail

Intersection of Polynomial Functions

Quickstart for Desktop Version Example 3: Intersection of Polynomial Functions

From playlist Quickstart for Desktop

Video thumbnail

Circumcircle of a Triangle

Quickstart for Desktop Version Example 1: Circumcircle of a Triangle

From playlist Quickstart for Desktop

Video thumbnail

Parameter einer linearen Gleichung

Quickstart für Web und Tablet App Beispiel 2: Parameter einer linearen Gleichung

From playlist Quickstart für Web und Tablet App

Video thumbnail

Intersection of Polynomial Functions

Quickstart for Web and Tablet App Example 3: Intersection of Polynomial Functions

From playlist Quickstart for Web and Tablet App

Video thumbnail

Parameters of a Linear Equation

Quickstart for Web and Tablet App Example 2: Parameters of a Linear Equation

From playlist Quickstart for Web and Tablet App

Video thumbnail

Schnitt einer Ebene mit einer Geraden

Quickstart für die Desktop Version Beispiel 5: Schnitt einer Ebene mit einer Geraden

From playlist Quickstart für die Desktop Version

Video thumbnail

Coding Challenge #143: Quicksort Visualization

In this video, I implement a Quicksort algorithm in JavaScript visualize the sorting with p5.js. 🤖This video is sponsored by Brilliant: https://brilliant.org/codingtrain 🤖 💻 Code: https://thecodingtrain.com/CodingChallenges/143-quicksort Links discussed in this video: 🔗 Quicksort: https:

From playlist Coding Challenges

Video thumbnail

Quicksort 3 – Recursive Pseudocode

This video describes the workings of a recursive quicksort, which takes a ‘divide and conquer’ approach to the problem of sorting an unordered list. It follows on from previous quicksort videos that covered algorithms for partitioning a list. Line by line, this video examines the executi

From playlist Sorting Algorithms

Video thumbnail

Big O Part 7 – Space Complexity versus Time Complexity

This is the seventh in a series of videos about using Big O notation to describe the complexity of an algorithm. That is, how the performance of an algorithm varies according to the amount of input data. This particular video looks at the time complexity, and space complexity, of three w

From playlist Big O Complexity

Video thumbnail

Quicksort 4 – VB.NET Implementation

This video describes a recursive VB.NET implementation of a quicksort. It follows on from previous quicksort videos that covered algorithms for partitioning a list, and pseudocode for a program that calls itself recursively to process successively smaller partitions, until the original li

From playlist Sorting Algorithms

Video thumbnail

Java Quick Sort

Get the Code Here: http://goo.gl/zPL7r Welcome to my Java Quick Sort tutorial! In most situations the Quick Sort is the fastest sorting algorithm. In essence, the quick sort works by partitioning arrays so that the smaller numbers are on the left and the larger are on the right. I'll cov

From playlist Java Algorithms

Video thumbnail

Schnitt einer Ebene mit einer Geraden

Quickstart für Web und Tablet App Beispiel 5: Schnitt einer Ebene mit einer Geraden

From playlist Quickstart für Web und Tablet App

Video thumbnail

Live Stream #173: Rubik's Cube and Quicksort Visualization

To learn more about Brilliant, go to https://brilliant.org/CodingTrain and sign up for free. The first 200 people that go to that link will get 20% off the annual Premium subscription. Welcome to another live stream on Rubik's Cube and Quicksort Visualization! I will try to program a simu

From playlist Live Stream Archive

Related pages

Recursion (computer science) | Sorting algorithm | Selection sort | Percentile | Dutch national flag problem | Insertion sort | Timsort | Primitive data type | Transdichotomous model | Integer overflow | Merge sort | Median of medians | Heapsort | Total order | Stirling's approximation | Parallel algorithm | Pseudocode | Median | LLVM | Chernoff bound | Divide-and-conquer algorithm | Object (computer science) | Quickselect | Bucket sort | Binary search tree | Radix sort | Shellsort | Prefix sum | Binomial coefficient | Recurrence relation | Samplesort | Comparison sort | Tail call | Integer sorting | Introsort | Selection algorithm | Tail recursion | In-place algorithm | Qsort | Communications of the ACM | Expected value | External sorting | Best, worst and average case | Analysis of algorithms | Master theorem (analysis of algorithms)