For the best experience, increase the window size or view on a laptop or desktop device
Title | ||
|---|---|---|
Loading... | ||
For the best experience, increase the window size or view on a laptop or desktop device
Title | ||
|---|---|---|
Loading... | ||
You are given an m x n matrix board, representing the current state of a crossword puzzle. The crossword contains lowercase English letters (from solved words), ' ' to represent any empty cells, and '#' to represent any blocked cells.
A word is only placed horizontally (left to right or right to left) or vertically (top to bottom or bottom to top) in the board if:
'#'.' ' (empty) or match the letter already on the board.' ' or other lowercase letters directly left or right of the word if the word was placed horizontally.' ' or other lowercase letters directly above or below the word if the word was placed vertically.Given a list of words, fill them into the board according to the rules.
You are given an m x n matrix board, representing the current state of a crossword puzzle. The crossword contains lowercase English letters (from solved words), ' ' to represent any empty cells, and '#' to represent any blocked cells.
A word is only placed horizontally (left to right or right to left) or vertically (top to bottom or bottom to top) in the board if:
'#'.' ' (empty) or match the letter already on the board.' ' or other lowercase letters directly left or right of the word if the word was placed horizontally.' ' or other lowercase letters directly above or below the word if the word was placed vertically.Given a list of words, fill them into the board according to the rules.
Output