The “bubble sort” method determines an intermediate reference value and divides the elements into two groups of “larger” values and “smaller” values. This operation is then repeated recursively on these two groups.
The “shell sort” method repeatedly compares two adjacent elements and swaps them if the first element is larger than the second.
The “quick sort” method sorts each substring composed of elements extracted at regular intervals, and then the interval is further decreased and the same operation is performed again. This operation is repeated until the interval becomes 1.
The “heap sort” method builds an ordered tree from the unsorted portion of the elements, extracts the maximum or minimum value from this ordered tree, and moves it to the sorted portion. This operational sequence is then repeated to gradually shrink the unsorted portion.
The square of n
The number of digits in n (base 10)
Log (base 2) of n
Only Depth-First Search
Only Breadth-first search
Both Breadth-first search and Depth-first search
None of them
X S Z Y R W P U T V
X Z Y S P W U V T R
R S X Y Z T U W P V
R S T X Y U V Z W P
(cursor->link( ) == NULL)
(cursor->data( ) == NULL)
(cursor == NULL)
(cursor->data( ) == 0.0)
The list structure is similar to the array structure in that all data elements of the same type are sequentially lined up. In the list structure, the logical arrangement is the same as the physical arrangement.
Using a subscript for each element in an array, quick access to any element can be achieved. The array structure allows any data to be inserted or deleted simply by modifying pointers.
The list structure allows any data to be inserted or deleted simply by modifying pointers. But, after the data was deleted, the cells that contained the data remain as garbage in memory.
The number of operations is fixed in inserting or deleting an element in an array; it does not depend on the position of the element in the array.