← All problemsSign in

3664. Two-Letter Card Game

LeetCodeArrayHash TableStringCountingEnumerationOpen on judge ↗

You are given a deck of cards represented by a string array cards, and each card displays two lowercase letters. You are also given a letter x. You play a game with the following rules: - Start with 0 points. - On each turn, you must find two compatible cards from the deck that both contain the letter x in any position. - Remove the pair of cards and earn 1 point. - The game ends when you can

HINT LADDERno hints yet
L1 Observation
L2 Technique
L3 Approach
L4 Pseudo-code
🔒
L5 Full solution
L5 unlocks only if you insist twice
solution.cppC++17

CodeSearch Tutor

Hints, not spoilers — it won’t hand over the full solution unless you insist.

voice by Sarvam AI

Sign in to chat with the tutor and save your progress.

Sign in to start