← 返回 amazon 的题目列表Design a Card Class
类型:online_judge
Design a class for a deck of cards. Implement a member function to randomly draw a card, ensuring each drawn card is unique until the deck is exhausted. Function: Card drawCard(). The card range is from 1 to 52, representing a standard deck. Example: Initializing a full deck: [1, 2, 3, ..., 52]. After calling, the sequence might be: [19 (drawn), 2, 3, ..., 52]. Requirement: Do not reset the deck until all cards are drawn. Describe how to implement this class and ensure its randomness.
Example
Input
52