Pyramid sorting algorithm
A sorting algorithm and pyramid technology, applied in computing, digital data processing, special data processing applications, etc., can solve the problems of heap sorting performance impact, quick sorting performance reduction, and many invalid moves.
- Summary
- Abstract
- Description
- Claims
- Application Information
AI Technical Summary
Problems solved by technology
Method used
Examples
Embodiment 1
[0015] The pyramid sorting algorithm of the present embodiment comprises the following steps:
[0016] ①. When sorting n data, first define an array a with n units, and then find an integer m, m is an integer power of 2, and m / 2
[0017] The way to find the integer m is: assign a value of 1 to a variable, then compare the variable with the value of n, if it is smaller than n, multiply it by 2, compare it with the value of n again, ... until the data Until it is greater than or equal to n, the value of this variable is m at this time.
[0018] ②. Define a b array with m units, the b array forms the base of the pyramid; define a c array with m units, and the c array forms the pyramid body.
[0019] ③. Initialize the c array, put the n data to be sorted into the b array, and put m-n minimum value data in the b array, the minimum value data is the minimum value data among the n data, forming m / 2 pairs of adjacent data; then compare them one by one, put the relatively large...
PUM
Abstract
Description
Claims
Application Information
- R&D Engineer
- R&D Manager
- IP Professional
- Industry Leading Data Capabilities
- Powerful AI technology
- Patent DNA Extraction
Browse by: Latest US Patents, China's latest patents, Technical Efficacy Thesaurus, Application Domain, Technology Topic, Popular Technical Reports.
© 2024 PatSnap. All rights reserved.Legal|Privacy policy|Modern Slavery Act Transparency Statement|Sitemap|About US| Contact US: help@patsnap.com