Introduction and classification of sorting algorithm

Time:2021-4-14

Introduction of sorting algorithm

Sorting is also a sort algorithm

Sorting is also called sorting algorithm(Sort Algorithm), sort is toA set of dataAccording toSpecified orderThe process of arranging. Sorting classification: 1) internal sorting: refers to all the data to be processed are loaded into theInternal memorySort in. 2) External ranking method:Too much data, can not be loaded into memory, need to sort with the help of external storage. 3) Classification of common sorting algorithms (see the figure on the right)

Introduction and classification of sorting algorithm

Sort of classification, this place, on the blackboard

Time complexity of the algorithm

Two methods to measure the execution time of a program (algorithm)

  1. The method of post statistics

    This method is feasible, but there are two problems

    1. First, in order to evaluate the performance of the designed algorithm, we need to run the program;
    2. Second, the time statistics depend on the hardware, software and other environmental factors of the computer,This way, to run in the same computer in the same state, can compare that algorithm faster.
  2. Methods of prior estimation

    1. By analyzing the time complexity of an algorithm to determine which algorithm is better

This work adoptsCC agreementReprint must indicate the author and the link of this article

Autumn leaves and summer wind

Recommended Today

Looking for frustration 1.0

I believe you have a basic understanding of trust in yesterday’s article. Today we will give a complete introduction to trust. Why choose rust It’s a language that gives everyone the ability to build reliable and efficient software. You can’t write unsafe code here (unsafe block is not in the scope of discussion). Most of […]