Bloomberg | Phone | Shuffle Cards
Anonymous User
2190
  1. Create a deck of cards (freedom on which data structure can be used)
  2. Shuffle the deck
  3. Deal cards from the shuffled deck to a specified number of players
  4. Allow players to exchange cards with the dealer if they don't like their cards (like in poker)

Similar kind of problem here: https://leetcode.com/problems/shuffle-an-array/solution/

Comments (3)