Basic concepts of sorting

Source: Internet
Author: User

Sorting is an important operation of data structure.

Sections 5.1 through 5.6 of this chapter describe the various methods of ordering within, and 5.7 sections describe the methods of sorting out.

In addition, heap ordering is a typical sort of selection, and the algorithm for heap sequencing is described in chapter 8th.

5.1 Basic Concepts

Before discussing the concept of sorting, first introduce the concept of sort code.

A sort code is one or more fields in a node whose values are used as the basis for sorting operations.

The sorting code can be the key code, at this time the sorting is according to the key code to sort the file;

The sort code can also be not a key code, at which point the sorting code for multiple nodes may have the same value, so the sorting result may not be unique.

The data type of the sort code can be either a positive number or a real or a string, or even a complex combination of data types

Basic concepts of sorting

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.