I am a newcomer using the vs2017 compiler, but there is a problem with the binary search method.
It's strange that I typed the code (as follows):
as long as the assignment is the third string, there must be an error. After debugging, the else if cannot enter, so change right = d-1; to right = d; and it is solved. After substituting in again, it was found that if the numbers like the subscripts 0 and 1, the code would loop indefinitely. After debugging, the conditions were changed back. At this point, I can find it by typing in the number 3 again, which is really incredible
The "bug" that makes me incredible
Guess you like
Origin blog.51cto.com/15093095/2621818
Recommended
Ranking