Home > Back-end >  Sequential search and binary search
Sequential search and binary search

Time:09-17

Big trouble to help me have a look at the (very urgent)

CodePudding user response:

Problem a lot oh, literally glanced at:
1. In the BBS can't post code,
2. Don't screenshots on the computer,
3. C and C + + array subscript begins with 0, so can't find the time, should return a negative number, usually return - 1;
4. Pass parameters, always want to have a temporary space (variable), and the parameter to pass to the temporary variables, as arguments passed in again, so you two lookup function parameter is wrong, should use the transfer reference: const SSTable & amp; , const is prohibited to modify the incoming object, without the key word to also go, but it's easy to get wrong,
5. Binary search is to find the premise of array to sort,
  • Related