Brainteaser LeetCode Problems: All 16,
With Python Solutions

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

Easy
2
Medium
13
Hard
1

Brainteaser 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
0319Bulb Switcher
1033Moving Stones Until Consecutive
1227Airplane Seat Assignment Probability
1503Last Moment Before All Ants Fall Out of a Plank
2396Strictly Palindromic Number
2419Longest Subarray With Maximum Bitwise AND
2425Bitwise XOR of All Pairings
2568Minimum Impossible OR
2731Movement of Robots
2745Construct the Longest New String
2749Minimum Operations to Make the Integer Zero
1908Game of NimPremium
2505Bitwise OR of All Subsequence SumsPremium

Hard (1)

Hard problems
No.Problem
0810Chalkboard XOR Game

Eyes only

When the Brainteaser 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.