Introduction - If you have any usage issues, please Google them yourself
If you want to pick out the largest and second largest data (requires output data location and value), the number of what method to use to compare data in the least in n? We can be inspired sports tournament. [1.png] As shown, the eight players of the tournament, the first to catch on twenty-two competition, eliminated half. Competition winner ... until then twenty-two decided at first. After the first output, as long as the yellow mark to the position of a re-match. The following code implements this algorithm (assuming the data is not the same value). The code needs to use an array to represent the figure of the tree (note that this is a full binary tree, filled less than required). It is not stored in the data itself, but the index data storage. After the first data output, its location is identified as-1