Large SpaceshipThe following were some of the situations related to large spaceships:
- The United States 'New Horizon spacecraft was mainly used to investigate Kuiper Belt celestial bodies such as Pluto and Charon. It was extremely fast, traveling at about 31,000 miles (49,900 kilometers) per hour, and was about 1.527 billion miles (2.457 billion kilometers) away from Earth.
- China's Tianzhou-7 cargo spacecraft was 10.6 meters long and adopted a two-cabin tandem configuration. The largest diameter was 3.35 meters, and the entire cargo carrying capacity was 7.4 tons. It was currently the spacecraft with the strongest cargo capacity in the world.
- China's Shenzhou 19 manned spacecraft could carry three astronauts on a space journey. For example, Cai Xuzhe, Song Lingdong, and Wang Haoze took Shenzhou 19 into space for about six months.
- On a global scale, the Orion spacecraft of the United States, the Soyuz spacecraft of Russia, and the Shenzhou spacecraft of China were all well-known spacecraft projects. Spaceships usually consisted of a return module, a service module (propulsion module), an orbital module, an emergency rescue device, and other components. They were large spacecraft that ensured that astronauts could live, work, and perform space missions in outer space and safely return to the ground.
The novel "Hundred Years of Spaceship" is equally exciting. Everyone is welcome to click and read it!
small to largeThe following are a few common sorting algorithms:
##1. Bubble sort
1. ** Principle **
- It repeatedly visited the sequence to be sorted, comparing two adjacent elements each time, and if the order was wrong (such as the larger element being before the smaller element), it would swap them.
- He repeated the process of searching the sequence until there were no more elements that needed to be exchanged. At that time, the sequence was completed.
2. ** Instance **
- Suppose there is a sequence [5, 3, 4, 6, 2].
- The first round of comparison: first compare 5 and 3, because 5 > 3, the exchange is [3, 5, 4, 6, 2]; then compare 5 and 4, 5 > 4, the exchange is [3, 4, 5, 6, 2]; then compare 5 and 6, no exchange; then compare 6 and 2, 6 > 2, the exchange is [3, 4, 5, 2, 6].
- The second round of comparison: starting from 3, compare 3 and 4 without swapping; compare 4 and 5 without swapping; compare 5 and 2, 5 > 2, swap to get [3, 4, 2, 5, 6].
- The third round of comparison: compare 3 and 4 without swapping; compare 4 and 2, 4 > 2, swap to get [3, 2, 4, 5, 6].
- The fourth round of comparison: compare 3 and 2, 3 > 2, swap to get [2, 3, 4, 5, 6]. At this moment, the sequence was completed.
##2. Sorting
1. ** Principle **
- Its basic idea was to select a certain element from the data to be sorted according to the specified rules, and then exchange the positions according to the rules to achieve the purpose of sorting.
- The first time, the minimum value was selected from the entire array and exchanged with the first element of the array; the second time, the minimum value was selected from the remaining elements (except for the first element that had been sorted) and exchanged with the second element of the array; and so on.
2. ** Instance **
- For the sequence [5, 3, 4, 6, 2].
- First round: First assume that 5 is the smallest value, then compare it with the following elements and find that 2 is the smallest. Exchange 2 and 5 to get [2, 3, 4, 6, 5].
- The second round: Start from 3. Assuming that 3 is the smallest value, compare it with the later ones and find that 3 is the smallest. Without swapping, the sequence is still [2, 3, 4, 6, 5].
- The third round: Start from 4. Assuming that 4 is the smallest value, compare it with the later ones and find that 4 is the smallest. Without swapping, the sequence is still [2, 3, 4, 6, 5].
- The fourth round: Starting from 6, assuming that 6 is the smallest value, compare it with the later ones and find that 5 is the smallest. Exchange 5 and 6 to get [2, 3, 4, 5, 6].
##3. Heap Sorting
1. ** Principle **
- First of all, he had to understand the concept of a heap. A heap had the properties of a complete tree. If the value of each node is less than or equal to the value of its children, it is called a small top heap.
- The basic idea of heap sorting was to construct the sequence to be sorted into a small top heap. At this time, the minimum value of the entire sequence was the root node at the top of the heap. If it was exchanged with the last element, the last element would be the minimum value. Then, the remaining n - 1 elements were reconstructed into a heap, which would get the second smallest value of n elements. Repeating this process would result in an orderly sequence.
2. ** An example (simple)**
- Suppose there is a sequence [5, 3, 4, 6, 2].
- First, construct it into a small top heap (the detailed steps are omitted here) to obtain a small top heap structure. The top heap element of 2 is the minimum value.
- Exchange 2 with the last element 6 to get [6, 3, 4, 2, 5], then rebuild the top heap of the sequence except for the last element 6, and continue this process until the sequence is orderly.
##4. Counting Sorts (applicable to a certain range of numbers)
1. ** Principle **
- This was a sorting algorithm that was not based on comparison.
- When sorting a certain range of numbers, its complexity is O (n + k)(where k is the range of numbers). It counted the number of times each number appeared in the sequence, and then according to the results of the statistics, the numbers were output in order to achieve sorting.
2. ** example (Assuming the range of the whole number is 0 - 9)**
- For the sequence [5, 3, 4, 6, 2].
- First, count the number of times each number appears. For example, 2 appears once, 3 appears once, 4 appears once, 5 appears once, and 6 appears once.
- Then, in the order of 0 - 9, the elements in the sequence were output according to the statistics, and [2, 3, 4, 5, 6] was obtained.