You are given a board of size pattern represented as an array of strings of size
A submatrix of board of size [i, j] matches pattern if there exists a valid mapping such that:
Each digit character in pattern matches the exact same integer value in the corresponding cell of board.
Each lowercase English letter in pattern maps to a single integer between
Each letter maps to a unique integer (no two distinct letters map to the same integer).
Every occurrence of the same letter in pattern maps to the same integer in the submatrix.
Return an integer array of length [i, j] of the top left corner of the matching submatrix. If multiple matches exist, return the one that appears first in row major order (smallest row index, and smallest column index in case of ties). If no match exists, return [-1, -1].
Constraints:
board.length
board[i].length
board[i][j]
pattern.length
pattern[i].length
pattern[i][j] is either a digit represented as a string or a lowercase English letter.
You are given a board of size pattern represented as an array of strings of size
A submatrix of board of size [i, j] matches pattern if there exists a valid mapping such that:
Each digit character in pattern matches the exact same integer value in the corresponding cell of board.
Each lowercase English letter in pattern maps to a single integer between
Each letter maps to a unique integer (no two distinct letters map to the same integer).
Every occurrence of the same letter in pattern maps to the same integer in the submatrix.
Return an integer array of length [i, j] of the top left corner of the matching submatrix. If multiple matches exist, return the one that appears first in row major order (smallest row index, and smallest column index in case of ties). If no match exists, return [-1, -1].
Constraints:
board.length
board[i].length
board[i][j]
pattern.length
pattern[i].length
pattern[i][j] is either a digit represented as a string or a lowercase English letter.