Hey y’all, I got a solution up for another frequently asked question, Leetcode LC348 Design Tic-Tac-Toe as well its variant.
I’ve seen the OG be asked but the twist also comes up half the time. The tricky part is that candidates will conflate one with the other, and walk through a verbal explanation as if they were asked the original LC problem when really, they were asked the variant. Please be careful and differentiate which problem is given.
The variant gives you a single isWin function call, and you must decide whether the player (1 or 2, it doesn’t matter) made a winning move or not.
Check it out (or not!):
Leetcode 348 Design Tic-Tac-Toe

Reference to all of the Meta Variants: https://leetcode.com/discuss/post/6615244/meta-variant-compilation-by-codingwithmi-0pm7/
Good luck on your phone screens & onsite loops.