Binary Search

Binary Search card


A binary search is an algorithm designed to quickly search a sorted data structure by recursively splitting sets of data in half and comparing their values.


Cut your deck into two piles. Draw one card from the top of each pile, then shuffle your deck. If the values of the two cards match, put both into your hand. Otherwise, put the card with the higher value in your hand, and the card with the lower value at the bottom of your deck.