arrays use the del button to delete an item from the middle of the array deletion works much the same as it did in the array appletshifting items with higher index numbers down to fill in the hole left by the deletion in the ordered arrayhoweverthe deletion algorithm can quit partway through if it doesn' find the itemjust as the search routine can binary search the payoff for using an ordered array comes when we use binary search this kind of search is much faster than linear searchespecially for large arrays the guess- -number game binary search uses the same approach you did as kid (if you were smartto guess number in the well-known children' guessing game in this gamea friend asks you to guess number she' thinking of between and when you guess numbershe'll tell you one of three thingsyour guess is larger than the number she' thinking ofit' smalleror you guessed correctly to find the number in the fewest guessesyou should always start by guessing if your friend says your guess is too lowyou deduce the number is between and so your next guess should be (halfway between and if she says it' too highyou deduce the number is between and so your next guess should be each guess allows you to divide the range of possible values in half finallythe range is only one number longand that' the answer notice how few guesses are required to find the number if you used linear searchguessing first then then and so onfinding the number would take youon the average guesses in binary search each guess divides the range of possible values in halfso the number of guesses required is far fewer table shows game session when the number to be guessed is table guessing number step number number guessed result too high too low too high too low too high too low correct range of possible values - - - - - - -