Home > Common Problem > body text

What does quick sort mean?

藏色散人
Release: 2020-06-29 10:36:30
Original
5832 people have browsed it

Quick sort is an improvement on bubble sort. Its implementation principle is to divide the unsorted elements into two subsequences based on a "pivot" as a benchmark. The records in one of the subsequences are larger than the main element. element, and the other subsequence is smaller than the pivot element, and then the two subsequences are sorted recursively using a similar method.

What does quick sort mean?

Quick sort

Divides unsorted elements into categories based on a "pivot" as a basis Two subsequences, one of which has records greater than the pivot, while the other subsequence is smaller than the pivot, then recursively sort the two subsequences in a similar way

Time complexity:O(Nlog2N)

Introduction:

Quicksort is an improvement on bubble sort.

Quick sort was proposed by C. A. R. Hoare in 1960. Its basic idea is to divide the data to be sorted into two independent parts through one sorting. All the data in one part is smaller than all the data in the other part, and then the two parts of the data are processed separately according to this method. Sorting, the entire sorting process can be performed recursively, so that the entire data becomes an ordered sequence.

The above is the detailed content of What does quick sort mean?. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template