4 ms·
Hah, 16:13 funny thing this world... Not that long ago I was at a job interview where they asked me to write a function that checks for a winner for 4-in-a-row.
by axegon_ 6y ago
Hah, 16:13 funny thing this world... Not that long ago I was at a job interview where they asked me to write a function that checks for a winner for 4-in-a-row. I gave a solution which used pretty much the exact same algorithm except in a 2-dimensional space. What was really cool imo that the solution fits in ~11-12 lines of python, even without using creature comforts like numpy.