Pregunta de entrevista de ShipBob

LLD problem on deck of cards