(POGIL) Define a pseudocode algorithm that will efficiently play the guessing game.
Answer
Go to middle number compare with the number you are searching. Check to see if the number is lower or higher than the middle number. Then split numbers again in middle depending on lower or higher. keep splitting in half until the number is found.This would be done with a conditional statement.
(POGIL) To guess a number between 1 and 100, what's the maximum number of guesses your algorithm would take?
Answer
The number is 7
(POGIL) To guess a number between 1 and 500, what's the maximum number of guesses your algorithm would take?
Answer
Suppose you have a deck of cards and you want to find the Ace of Spades. If the deck is shuffled, which is the best search algorithm to use and why?
Answer
10
The sequential search is best because there is no order to the cards.
Give an example of a search problem you encounter in everyday life. Do it use sequential, binary, or some other search?
Answer
Searching for names on a list I do a combination of binary and sequential. first I use binary to get the area in the list has all the same last names then do a sequential search for the first name. this may not be the fastest search for big data types but it is how I search for names on a small list of thirty names.