Brainteaser DSA Problems

16 brainteaser problems for coding interviews and campus placements, with hints and company tags. Below are all 16: 2 easy, 13 medium and 1 hard. Practise them free on InternHack and track what you have solved.

Brainteaser problems, easiest first

  1. Divisor Game (Easy)
  2. Nim Game (Easy)
  3. Airplane Seat Assignment Probability (Medium)
  4. Bitwise OR of All Subsequence Sums (Medium)
  5. Bitwise XOR of All Pairings (Medium)
  6. Bulb Switcher (Medium)
  7. Construct the Longest New String (Medium)
  8. Count the Number of Computer Unlocking Permutations (Medium)
  9. Last Moment Before All Ants Fall Out of a Plank (Medium)
  10. Longest Subarray With Maximum Bitwise AND (Medium)
  11. Minimum Operations to Make the Integer Zero (Medium)
  12. Movement of Robots (Medium)
  13. Moving Stones Until Consecutive (Medium)
  14. Strictly Palindromic Number (Medium)
  15. Vowels Game in a String (Medium)
  16. Chalkboard XOR Game (Hard)

Companies that ask brainteaser problems

Before your interview

Most resumes are filtered by software before a recruiter reads them. Check your resume ATS score free, no signup needed.

Other DSA topics