Banco público de perguntas reais para entrevistas: explore por empresa, categoria e tema
CodingSenior

Go Scoreboard

Given a matrix representing a Go board with the following types: '' - empty, 'w' - white, 'b' - black, return a final score for the winner of the board. The score is just the number of cells that make up its outer shell. Keep in mind, if a structure is surrounded on all sides by the opposite color, its points are forfeit. Follow-up: for the white side, write a function that returns the single empty cell '' that the player should add a 'w' to in order to increase their score the most.

Empresas em que apareceu
MetaMeta
Contextos reais

Onde essa pergunta já apareceu

Use esses exemplos para entender em que contexto ela costuma cair e adaptar sua prática.

Metaseniorago. de 2024

Given a matrix representing a go board with the following types: '' - empty 'w' - white 'b' - black return a final score for the winner of the board. The score is just the number of cell that make up its outer shell. Keep in mind, if a structure is surrounded on all sides by the opposite color, its point are forfeit. Followup: for the white side, write a function that returns the single empty cell '' that the player should add a 'w' to in order to increase their score the most.

Anexos públicos

Materiais associados

Nenhum anexo público associado a esta pergunta.

Sinais de resposta forte
Você deixa claro por que escolheu essa abordagem e o que descartou.
Seu código vem acompanhado de testes mentais e edge cases relevantes.
Sua explicação ajuda o entrevistador a acompanhar o raciocínio em tempo real.
O que costuma enfraquecer a resposta
Entrar direto no código sem alinhar interpretação do problema.
Passar tempo demais em silêncio e só explicar no fim.
Ignorar complexidade, invariantes e estratégia de teste.

Continue a preparação com o banco completo

No app você encontra perguntas parecidas, compara empresas e aprofunda essa busca com mais filtros.