Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What is sorting?

2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/03 Report--

Today, I would like to talk to you about what sorting is, many people may not know much about it. In order to make you understand better, the editor has summarized the following contents for you. I hope you can get something from this article.

Sorting refers to the process of arranging disorganized data elements according to keyword order through certain methods; its purpose is to adjust a group of "unordered" record sequences to "ordered" record sequences. Sorting is divided into internal sorting and external sorting; if the whole sorting process can be completed without access to external memory, it is called internal sorting; otherwise, it is called external sorting.

Sorting is an operation that is often carried out in the computer, and its purpose is to adjust a group of "unordered" record sequences to "ordered" record sequences. It is divided into internal sorting and external sorting. If the whole sorting process can be completed without access to external memory, this kind of sorting problem is called internal sorting. On the other hand, if the number of records participating in sorting is so large that the sorting process of the whole sequence can not be completed in memory, this kind of sorting problem is called external sorting. The process of internal sorting is a process of gradually expanding the length of the ordered sequence of records.

Concept:

The process of arranging disorganized data elements by keyword order in a certain way is called sorting.

Common sorting algorithms:

Quick sorting, Hill sorting, heap sorting and direct selection sorting are not stable sorting algorithms, while cardinality sorting, bubbling sorting, direct insertion sorting, half insertion sorting and merge sorting are stable sorting algorithms.

Classification:

Stable sorting: suppose that in the file to be sorted, there are two or more records with the same keyword. After sorting by some sort method, if the relative order of the elements with the same keyword remains the same, then the sorting method is stable. Among them, bubbling, insertion, cardinality, merging belong to stable sorting, selection, fast, Hill, belong to unstable sorting.

Local sorting: if the auxiliary space required by the sorting algorithm does not depend on the scale n of the problem, that is, the auxiliary space is O (1), it is called local sorting.

After reading the above, do you have any further understanding of what sorting is? If you want to know more knowledge or related content, please follow the industry information channel, thank you for your support.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report