Jump Trading logo

Jump Trading

Chicago, ILTrading

Interview Questions

Card Set Detection

Asked at Jump Trading
technical
algorithms
game logic

Implement a card set detection system that finds the strongest possible set.

Card Format: "" (e.g., "10S", "QH")

  • Suits: S > H > D > C
  • Ranks: 2-10, J, Q, K, A (ascending)

Sets (weakest to strongest):

  1. Single Card
  • Highest rank card
  • Suit irrelevant
  1. Pair
Example: {
  "set_name": "pair",
  "selected_cards": ["10H", "10S"]
}
  1. Triple
Example: {
  "set_name": "triple",
  "selected_cards": ["AH", "AD", "AC"]
}
  1. Five in a Row
Example: {
  "set_name": "five in a row",
  "selected_cards": ["7S", "8S", "9S", "10S", "JC"]
}
  1. Suit
Example: {
  "set_name": "suit",
  "selected_cards": ["2D", "4D", "6D", "8D", "9D"]
}
  1. Triple and Pair
Example: {
  "set_name": "a triple and a pair",
  "selected_cards": ["10D", "10H", "10C", "JH", "JC"]
}

Card Set Detection

Asked at Jump Trading
technical
algorithms
game logic

You are given N cards with suits (S, H, D, C) and ranks (2-10, J, Q, K, A). Each card is formatted as "". Detect the strongest possible card set.

Card Sets (weakest to strongest):

  1. Single Card
Name: "single card"
Highest rank card, suit irrelevant
  1. Pair
Name: "pair"
Example: {
  "set_name": "pair",
  "selected_cards": ["10H", "10S"]
}
  1. Triple
Name: "triple"
Example: {
  "set_name": "triple",
  "selected_cards": ["AH", "AD", "AC"]
}
  1. Five in a Row
Name: "five in a row"
Example: {
  "set_name": "five in a row",
  "selected_cards": ["7S", "8S", "9S", "10S", "JC"]
}
  1. Suit (5 cards)
Name: "suit"
Example: {
  "set_name": "suit",
  "selected_cards": ["2D", "4D", "6D", "8D", "9D"]
}
Suit order (highest to lowest): S > H > D > C
  1. Triple and Pair
Name: "a triple and a pair"
Example: {
  "set_name": "a triple and a pair",
  "selected_cards": ["10D", "10H", "10C", "JH", "JC"]
}

Jump Trading System Design

Asked at Jump Trading
technical
system design
trading
algorithms
oa

System design question with multiple components:

Jump Trading Part 1 Jump Trading Part 2 Jump Trading Part 3 Jump Trading Part 4 Jump Trading Part 5 Jump Trading Part 6

Share Your Experience at Jump Trading