Flip the Card Puzzle

Flip the Card Puzzle:

Solve the card game: Flip the card Puzzle.

  • You are blindfolded and are handed a deck of playing cards. There are 10 cards in the deck facing up while the rest are facing down.

Objective:

  • The objective of the game is to divide the 52 cards into two piles such that both the piles have an equal number of cards facing up.
Flip the card puzzle

Solution

Given, there are 10 cards with face up and 42 cards facing down. To solve this problem, I will divide the cards into two piles, with one pile containing 10 cards, named pile 1, and another containing 42 cards named pile 2.

Then I will flip all the cards in pile 1 while keeping pile 2 as it is. Once I do this, I will have an equal number of cards in both piles facing up.

How does this work?

The logic behind this solution is that the number of cards facing up is 10, and this will be constant while distribution.

Let us consider some cases.

Case 1:

Pile 1:- 2 cards facing up

       8 cards face down

Pile 2:- 8 cards facing up

      34 cards face down

Flip:-  cards in pile 1

Result:-  8 cards in pile 1 are
facing up

which is the same as pile 2
Case 2:

Pile 1:- 0 cards facing up

     10 cards face down

Pile 2:- 10 cards facing up

    32 cards face down

Flip:- cards in pile 1

Result:- 10 cards in pile 1 are
facing up

which is the same as pile 2
Case31:

Pile 1:- 10 cards facing up

        0 cards face down

Pile 2:- 0 cards facing up

       42 cards face down

Flip:-  cards in pile 1

Result:-  10 cards in pile 1 are
        facing down

       which is the same as pile 2

The main idea behind this solution is that there would always be 10 cards that are facing up (combining both piles). So when we are flipping one pile, the cards facing up in that pile are flipped down and the ones that are down are flipped up. Making the total number of cards the same in both piles.

Prime Course Trailer

Related Banners

Get over 200+ course One Subscription

Courses like AI/ML, Cloud Computing, Ethical Hacking, C, C++, Java, Python, DSA (All Languages), Competitive Coding (All Languages), TCS, Infosys, Wipro, Amazon, DBMS, SQL and others

Checkout list of all the video courses in PrepInsta Prime Subscription

Checkout list of all the video courses in PrepInsta Prime Subscription