A friend of mine wanted to see if I could figure this out.. and it's driving me crazy!! Maybe I'm just over thinking it? Anyways, can anyone figure this out?
Design an algorithm to sort a deck of cards with the restriction that the cards must be kept stacked in the deck, and the only allowed operations are to look at the value of the top two cards, to exchange the top two cards, and to move the top card to the bottom of the deck