Back to problems

Minimize Marbles in Grid

Algorithm · Snowflake · Hard

Marbles Removal Medium · Topics · Company Tags · Hints You are given an n x n grid grid where each cell contains either 'X' or 'O'. A cell with 'X' holds a marble. You may repeatedly choose any marble and remove it from the board, provided that at least one other marble shares its row or at least one other marble shares its column at the moment of removal. Your task is to apply a sequence of allowed removals in order to minimize the total number of marbles remaining in the…

Checking your access…