This is more like a bug than a problem. In this example:
tic_tac_toe([["X", "O", "X"], ["X", "O", "X"], ["O", "O", "X"]]) should return "O wins"
0 is a winner vertically through the center and X is a winner vertically through the right side. Since there’s no way of knowing who got 3 first this is impossible to answer. Maybe should be a draw?
Your browser information:
User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/143.0.0.0 Safari/537.36