Game Theory LeetCode Problems: All 25,
With Python Solutions

Every problem in this library that LeetCode tags Game Theory. 20 of them carry a complete Python solution, a worked example and the time and space complexity of the approach.

Easy
2
Medium
13
Hard
10

Game Theory problems by difficulty

Problems with a complete Python solution are listed first, then by ascending problem number.

Easy (2)

Easy problems
No.Problem
0292Nim Game
1025Divisor Game

Medium (13)

Medium problems
No.Problem
0375Guess Number Higher or Lower II
0464Can I Win
0486Predict the Winner
0877Stone Game
1140Stone Game II
1561Maximum Number of Coins You Can Get
1686Stone Game VI
1690Stone Game VII
1927Sum Game
2029Stone Game IX
2038Remove Colored Pieces if Both Neighbors are the Same Color
0294Flip Game IIPremium
1908Game of NimPremium

Hard (10)

Hard problems
No.Problem
0810Chalkboard XOR Game
0913Cat and Mouse
1406Stone Game III
1510Stone Game IV
1563Stone Game V
1728Cat and Mouse II
1872Stone Game VIII
0843Guess the Word
2005Subtree Removal Game with Fibonacci TreePremium
2868The Wording GamePremium

Eyes only

When the Game Theory problem arrives live.

In the live round, Stealth Interview reads the problem off your screen, returns a working solution with a step-by-step explanation and its time and space complexity, and transcribes what the interviewer says. It's a desktop app for macOS and Windows, invisible to screen sharing.