Back to problems

Design a Deck of Cards

Object-Oriented Programming · Apple · Medium

Build a Standard Card Deck Phone Screen, Onsite Software Engineer Reported February 2026 Create a conventional deck containing 52 playing cards. Represent each card with a two- or three-character value written as {rank}{suit}: Rank order (lowest through highest): 2, 3, 4, 5, 6, 7, 8, 9, 10, J, Q, K, A Suit order (used to break ties): C for clubs, D for diamonds, H for hearts, and S for spades For instance, the three of clubs is written as "3C", while the ace of spades is…

Checking your access…