20172321 six weeks Classroom Practice Revision report 20172321 six weeks Classroom Practice revision report
Error questions and Reasons
- The wrong question 1: two-point search
- Cause: The number of elements found in the binary is an even number, I understand a bit of a problem, so the number 10 to find 4 times
- Wrong Title 2: Hash Lookup
- Cause: Error in location of element 21
Problem analysis and modified two-point search for wrong questions
- Find from the middle element of an ordered list, and if the intermediate element is not the target element, then the first half or the last half of the list is judged based on the size of the two elements. Each search begins with the middle element of the current string of numbers. The element is not found until the last one is found or a message is thrown.
- If the intermediate element is an even number, select any element as an intermediate element. (select either the previous or the last one)
- Wrong title modification:
Hash Lookup
- In the case of a lookup, establish a definite correspondence between where the record is stored and its keyword h, the keyword K for each element in the linear table is the argument, and the function H (K) calculates where the element is stored, and we call the H function a hash function or a hash function. This lookup method is called Hash lookup.
- Wrong title modification:
Sentiment
Class listen to the effect is not good, do not understand these several methods, but now understand, I like to write blog
Resources
- Binary search algorithm
- Hash table
20172321 Six week classroom Practice change report