In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-23 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Network Security >
Share
Shulou(Shulou.com)06/01 Report--
Pull sort is a sort algorithm that does not change the original sequence (array), but creates a new sequence and operates on the new sequence length.
Here to sort from small to large as an example to stop explaining.
Fundamental thinking and illustration
The fundamental idea of unsorting is to add elements one by one to the array that has been sorted, and at the same time request that the unsorted elements must be in the correct position, so that the array that was sorted is still ordered.
In practice, the normal day is to sort all the disordered arrays, so divide this disordered array into two partially sorted subarrays and elements to be pulled out. In the first round, take the first element as a sorted subarray and pull out the second element; in the second round, take the first two elements as a sorted array and pull out the third element. Similarly, in the ith round of sorting, the i+1 th element is pulled out of the subarray of the first i elements. Until all elements participate in the sorted array.
Below, the extraction process is explained in order of 3 2 4 1 stop selection, and the position of element requirement extraction is described by j. The purpose of sorting is to arrange arrays from small to large.
round 1
[ 3 ] [ 2 4 1 ](final form, divide the first element into sorted subarrays, others are to be extracted)
[ 3 ] [ 2 4 1 ](since 3>2, the status to be extracted j=1)
[ 2] [ 4](pull 2 out to position j)
round 2
[ 2] [3 ] [ 4](1st Round Sequencing Consequences)
[ 2][3 ] [ 4] [ 4]
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.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.