Can detailed analysis of A, B, C, D? Thank you very much!
CodePudding user response:
Sequential method to find 1 2, 3, 6, respectively, with the number of times is 1 2, 3, 6 timesDichotomy found 1 2, 3, 6, respectively, with the number of times is 1, 3, 4, 2 Add up to know The key is to determine the dichotomy found the process of the number of 1, 2, Range of 1 ~ 11 for the first time, is compared to six, namely one find 6 The second range 1 ~ 5, is compared with 3, 2 times to find 3 1 ~ 2 for the third time, , which is 3 times to find 1, 4 times find 2 Why is 1 and 2 after 1, 2 and generally mid=+ large (small)/2 natural truncation forensics, won't call a ceil or floor function such as (1 + 2)/2 again, the result is 1,