Correction

In the cattle off of the Internet to make choices Correction:
1. binary tree traversal just to find a linear sequence in the application. (On)
Analysis: binary tree traversal is that according to certain rules and order traveled all the nodes of a binary tree, so that each node have been visited once, and only accessed once. Since a binary tree is a non-linear structure, therefore, traversing the tree is essentially converts the binary tree each node is represented as a linear sequence.
2. Using an open addressing hash lookup method (process after the hash value conflict) settlement of the conflict, the reasons for gathering occurred mainly (conflict resolution algorithm is not good)
3. Minimum heap [0,3,2,5,7 , 4,6,8], the top of the heap after deleting the element 0, the result is (2,3,4,5,7,8,6);
Analysis: remove the top stack element after 0, i.e., the last element would 8 moved to the top of the stack, and then adjusted downward until the top of the heap of small compliance, that is 2,3,4,5,7,8,6 resulting sequence.
4.n number contained in the clue threaded binary nodes is n + 1.
Analysis: There are two leaf node number of leads, a degree of the node has a number of leads, and because n0 = n2 + 1, then n0 + n1 = n1 + n2 + n0 + 1 = n + 1.
The sequence symmetrical binary tree node is ABCDEFG, the sequence is a sequence BDCAFGE, the preamble sequence is a binary tree (EACBDGF)
Analysis: This question is because they do not know the sequence in order asymmetric wrong sequence.
6. The reset sequence length 30 of the linear form, divided into 5 blocks, each block element 6, and if the block search block within the index tables are used, and sequential search, which is the average length of (6.5).
Analysis: Correction
block search step :( can each internal random, but between the blocks and the block order)
1) to be the key index table lookup contrast, to find a key which, if a sequential search for the average length ( 1 + 2 + 3) / 3 = 2
2) If a key in the second block, the second block in order to find with an average length of (1 + 2 + 3 + 4) 4 = 2.5
to this question then is: index table lookup to find the length of the block length + namely: (1 + 2 + 3 + 4 + 5) / 3 = 5 (1 + 2 + 3 + 4 + 5 + 6) add up to 6.5 /6=3.5
7. For Hill sorting algorithm is described in the correct (the last step certain length increment of 1 (last line must be inserted between adjacent elements of the sort, insertion sort i.e. the entire array)) ,
the interior of the segmentation algorithm sorting sequences direct insertion sort)

Guess you like

Origin blog.51cto.com/14232274/2442078