Flipkart Interview Question for SDE1s
- 0of 0 votes
AnswersThere is a n player game of cards. The deck of card is not fair, i.e. any card can be there any number of times. A card has a number and a color. Each player gets k card each (n and k can be harcoded in the solution). The computer starts the game by throwing a card from the deck of cards. Assume the card is 4 of Green. Then the other player has to throw either a 4 of any color or Green of any number. If the player does not have any such card, then it can say pass. The player who finishes all his card wins. The logic of selecting the card by the user can be hardcoded (Eg, If you use a list data structure for storing the cards for a player, then you can say that the player always throws the first card from the list). The logic was required only to start and conclude the game.
- kri1311 May 26, 2015 in India| Report Duplicate | Flag | PURGE
Flipkart SDE1 Algorithm
Interview Type: In-Person