Cody

Problem 3690. OXO counting

Count the number of occurrences of "OXO" in rows, columns, diagonals and anti-diagonals.

Example:

    >> board = ['OOX'
                'XXO'
                'OXO'];
    >> count_OXO(board)
    ans =
       3
    >> board = [' O '
                'XXO'
                'OXO'];
    >> count_OXO(board)
    ans =
       1

Solution Stats

50.0% Correct | 50.0% Incorrect
Last solution submitted on Feb 03, 2019

Problem Comments