Algorithm · Capital One · Medium
You are given an integer grid matrix and a smaller grid pattern. Your goal is to locate a contiguous block of matrix, having exactly the same dimensions as pattern, that is consistent with the pattern, and report the coordinate of that block's top-left cell. Every cell of pattern holds one of two kinds of tokens: an integer or a single letter. The rules for a block to be consistent are: A pattern cell containing an integer requires the aligned cell of the block to hold…