EASYasked at 1 company

Determine Color of a Chessboard Square

A easy-tier problem at 79% community acceptance, tagged with Math, String. Reported in interviews at J.P. Morgan and 0 others.

Founder's read

You get a chessboard coordinate like 'a1' or 'h8' and need to return its color. Sounds trivial until you realize it's asked at J.P. Morgan. The trap is trying to hardcode or simulate the board. The real pattern is pure math: chessboard colors alternate based on the sum of row and column indices. One check, one return, done. If you hit this live and blank on the shortcut, StealthCoder surfaces the solution invisible to the proctor, so you move on.

Companies asking
1
Difficulty
EASY
Acceptance
79%

Companies that ask "Determine Color of a Chessboard Square"

If this hits your live OA

Determine Color of a Chessboard Square is the kind of problem that decides whether you pass. StealthCoder reads the problem on screen and surfaces a working solution in under 2 seconds. Invisible to screen share. The proctor sees nothing. Made by an Amazon engineer who watched the leaked-problem repo become an industry secret. He decided you should have it too.

Get StealthCoder
What this means

The obvious approach wastes time. You don't need to know chess, visualize the board, or track state. Convert the letter to a number (a=1, h=8), extract the row number, add them together, and check if the sum is even or odd. That's the entire algorithm. The trick nobody sees coming is that chessboard parity is purely arithmetic. Candidates freeze because they expect complexity. They don't. If this problem hits your live assessment and the pattern isn't instant, StealthCoder runs invisible during screen share and hands you a working solution in seconds, so you skip the mental friction.

Pattern tags

The honest play

You know the problem. Make sure you actually pass it.

Determine Color of a Chessboard Square recycles across companies for a reason. It's easy-tier, and most candidates blank under the timer. StealthCoder is the hedge: an AI overlay invisible during screen share. It reads the problem and surfaces a working solution in under 2 seconds. Made by an Amazon engineer who watched the leaked-problem repo become an industry secret. He decided you should have it too. Works on HackerRank, CodeSignal, CoderPad, and Karat.

Determine Color of a Chessboard Square interview FAQ

Is this problem actually asked at top companies?+

Yes. J.P. Morgan has reported it. It's classified as Easy with a 79% acceptance rate, which means most people pass, but it still trips up candidates who overthink it or try to hardcode board logic instead of recognizing the math pattern.

What's the real trick?+

There is no trick. Convert the letter coordinate to a number, add it to the row number, check parity. If the sum is even, it's one color; if odd, the other. That's the entire solution. The trick is recognizing you don't need to simulate anything.

How does String parsing relate to the solution?+

You extract two pieces of information from the input string: the letter (column) and the digit (row). Convert the letter to its numeric position, then do arithmetic. String parsing is the gateway, math is the payload.

Will I have time to solve this in a live assessment?+

If you see the pattern, under two minutes. If you don't, you can waste 10 minutes trying to visualize or hardcode. That's why knowing the trick beforehand matters. This is the kind of problem where confidence and pattern recognition collapse time.

Is this a common filter question or a deep-dive problem?+

It's a screen filter, not a depth problem. Companies use it to eliminate candidates who panic on simple math or overthink. Once you know the pattern, it's a confidence point that lets you move to harder problems without friction.

Want the actual problem statement? View "Determine Color of a Chessboard Square" on LeetCode →

Frequency and company-tag data sourced from public community-maintained interview-report repos. Problem, description, and trademark © LeetCode. StealthCoder is not affiliated with LeetCode.