Microsoft Interview Puzzles
-
Someone picks, at their will, two cards from a deck of cards. The cards have different numbers, so one is higher than the other. (In other words, the person picks two distinct numbers in the inclusive range 1 through 13.) The cards are placed face down on a table in front of you. You get to choose one of the cards and turn it face up. Now, you will select one of the two cards (one of whose face you can see, the other one you can’t). If you select the highest card, you win. Design a card-selection strategy for which your chance of winning is strictly greater than 50%.
Submit Solution- 1,605.8K views
- 0 answers
- 0 votes
-
There is a polynomial and you have access to a function that evaluates that polynomial at a given number. You don’t know the degree of the polynomial, nor do you know any of the coefficients of its terms. However, you are told that all coefficients are non-negative integers. How many times do you need to call the evaluation function in order to identify the polynomial (that is, to figure out the values of its coefficients)?
View SolutionSubmit Solution- 1,607.2K views
- 1 answers
- 0 votes
-
There is a table with a row of 2014 cards. Each card has a red side and a blue side. We’ll say that a card is red if the color on its visible face is red, and analogously for blue. Two players take turns to do the following move: select any 50 consecutive cards where the left-most card is red, then flip each of those 50 cards (thus, for those 50 cards, turning red cards into blue cards and blue cards into red cards). Both players look at the cards from the same side of the table, so “left-most” means the same to both of the players (that is, you can think of one of the ends of the table as being designated as the left end). When it is a player’s turn, if that player cannot make a move (that is, if there is no way to select 50 consecutive cards the left-most one of which is red), then that player loses and the other player wins. If you are one of the players and all cards are initially red, can you be sure to win, and if so, do you want to be the player who goes first or second?
View SolutionSubmit Solution- 1,606.2K views
- 1 answers
- 0 votes
-
Two arbitrary rectangles are placed to form an “L”. That is, the lower left-hand corner of the two rectangles share the same point. (What I’m trying to say is that there’s an “L” whose “I” and “_” parts have arbitrary widths and heights.) Using only a (pen and a) straightedge (that is, no measuring device and no compass), figure out a way to, with a single straight cut, divide the “L” into two pieces of equal area.
View SolutionSubmit Solution- 1,608.7K views
- 1 answers
- 0 votes
-
Seven men engaged in play. Whenever a player won a game he doubled
the money of each of the other players. That is, he gave each player just as
much money as each had in his pocket. They played seven games and,
strange to say, each won a game in turn in the order of their names, which
began with the letters A, B, C, D, E, F, and G.
strange to say, each won a game in turn in the order of their names
When they had finished it was found that each man had exactly $1.28 in his
pocket. How much had each man in his pocket before play?View SolutionSubmit Solution- 1,608.9K views
- 1 answers
- 1 votes
-
A man persuaded Weary Willie, with some difficulty, to try to work on a
job for thirty days at eight dollars a day, on the condition that he would forfeit
ten dollars a day for every day that he idled. At the end of the month
neither owed the other anything, which entirely convinced Willie of the folly
of labor. Can you tell just how many days’ work he put in and on how many
days he idled?View SolutionSubmit Solution- 1,609.6K views
- 2 answers
- 0 votes
-
A man went into a bank to cash a check. In handing over the money the
cashier, by mistake, gave him dollars for cents and cents for dollars. He
pocketed the money without examining it, and spent a nickel on his way home.
He then found that he possessed exactly twice the amount of the check. He
had no money in his pocket before going to the bank. What was the exact
amount of that check?View SolutionSubmit Solution- 1,608.3K views
- 1 answers
- 0 votes
-
There are two tribes in Mars, Lie tribe and Truth Tribe.
Lie tribe always speaks lie, True tribe always speaks truth.
You meet three mars people and ask
From First Person: What tribe you belong to?, he replies something in his language which you don’t understand.
Second person tells that he is saying that he belongs to Lie Tribe.
Third person says that second person is lying.
What tribe does the third person belong to?
View SolutionSubmit Solution- 1,615.1K views
- 2 answers
- 1 votes
-
You are blindfolded and 10 coins are place in front of you on table. You are allowed to touch the coins, but can’t tell which way up they are by feel. You are told that there are 5 coins head up, and 5 coins tails up but not which ones are which. How do you make two piles of coins each with the same number of heads up? You can flip the coins any number of times.
View SolutionSubmit Solution- 1,612.9K views
- 1 answers
- 0 votes
-
Consider a rectangular grid of 4×3 with lower left corner named as A and upper right corner named B. Suppose that starting point is A and you can move one step up(U) or one step right(R) only. This is continued until B is reached. How many different paths from A to B possible ?
View SolutionSubmit Solution- 1,609.8K views
- 1 answers
- 0 votes