Novo curso: Como conseguir vagas remotas em empresas que pagam $120k+/ano
NaGringa
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.

Próximo passo

Depois de treinar essa pergunta, vale abrir outras do mesmo tipo e da mesma senioridade para comparar padrões de resposta.

Isso ajuda a sair da memorização de uma resposta só e entrar em repertório real de entrevista.

Continue a preparação com o banco completo

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