Search
⌘K

Leetcode 1958. Check if Move is Legal

Determine whether placing your color at a specified free cell on an 8x8 board produces any "good line" by scanning all 8 directions for the pattern: one or more contiguous opponent pieces immediately adjacent to the placed cell followed by a same-color piece (no '.' in between), which together form a line of length ≥ 3.


Question Timeline

See when this question was last asked and where, including any notes left by other candidates.

Comments

Your account is free and you can post anonymously if you choose.