Novo curso: Como conseguir vagas remotas em empresas que pagam $120k+/ano
NaGringa
CodingMid-level

Leetcode 2018. Check if Word Can Be Placed In Crossword

Given an m×n crossword grid of letters, blanks, and blocks, determine whether a target word can fit into any horizontal or vertical slot (in any direction) where the contiguous non-block cells either match the word's letters or are blank, and the slot is properly bounded by blocks or edges so it doesn't have extra letters/spaces adjacent to the placed word. Return true if any such placement exists.

Empresas em que apareceu
AmazonAmazon
Contextos reais

Onde essa pergunta já apareceu

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

Amazonmidset. de 2024

Implement a function to count and locate word placements in a crossword puzzle. Given a 2D matrix representing an empty crossword puzzle with 'B' for unavailable squares and 'W' for available squares, determine the number of places words can be placed horizontally or vertically of any length (including 1). Return the total count and coordinates for each possible word placement.

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.