FastPrepFind a Symbolic Pattern in a Numeric Matrix
Problems/Find a Symbolic Pattern in a Numeric Matrix

Find a Symbolic Pattern in a Numeric Matrix

ZipRecruiter logoZipRecruiter● MediumNEW GRADOA

Updated Nov 2026

QuestionFunctionExamplesConstraints

Problem statement

Source note: Two ZipRecruiter new-grad OA reports describe sliding symbolic patterns over numeric matrices, exact numeric values, equal letters meaning equal numbers, the coordinate of the first match, a no-match result, and the [[4,a],[a,8]] example. We supplied row-major order and the rule that different letters must be different numbers. Our version is about 94% the same as the reported questions.

Slide pattern over every fitting position of matrix in row-major order. A pattern token is either an integer literal or one lowercase letter.

  • An integer literal must equal the covered matrix value.
  • Every occurrence of one letter must map to the same value.
  • Different letters must map to different values.

Return the first matching top-left coordinate, or [-1,-1] when none exists.

Function

findSymbolicPattern(matrix: int[][], pattern: String[][]) → int[]

Examples

Example 1

matrix = [[9,9,9,4,1],[9,9,9,1,8]]pattern = [["4","a"],["a","8"]]return = [0,3]
matrix
01234099941199918

The source-shaped pattern first matches at coordinate [0,3].

Example 2

matrix = [[1,2],[3,4]]pattern = [["9"]]return = [-1,-1]
matrix
01012134

A missing literal returns the sentinel.

Constraints

  • 1 <= matrix rows, columns <= 100
  • 1 <= pattern rows, columns and the pattern fits inside the matrix.

More ZipRecruiter Online Assessment questions

  • Four-Level Banking System with Scheduled PaymentsOA · Seen Oct 2026
  • Count Three-Digit Numbers with Distinct DigitsOA · Seen Oct 2024
  • Longest Frequency-Bounded SubarrayOA · Seen Oct 2024
  • Minimum Changes to Draw a YOA · Seen Oct 2024
  • Apply Binary State OperationsOA · Seen Sep 2024
  • Simulate Orchard Rot SpreadOA · Seen Sep 2024
  • Compare Odd- and Even-Index SumsOA · Seen Sep 2024
  • Coordinate Removals with Column GravityOA · Seen Sep 2024
  • Lexicographically Smallest End ReversalOA · Seen Sep 2024
  • Recursively Expanded Shell Command CountsOA · Seen Sep 2024

Similar questions at other companies

  • Gaussian Naive Bayes Classifier (Machine Learning OA)Pinterest · OAPinterest interview questions
  • Find a Symbolic Matrix PatternCapital One · OACapital One interview questions
  • First Completed Mingo LineEpic · OAEpic interview questions
  • Count 2x2 Submatrices by Black CellsTikTok · OATikTok interview questions
  • Hidden ArtifactsIMC Trading · OAIMC Trading interview questions
  • Word Chain Jumps in a GridGoogle · PHONE SCREENGoogle interview questions
  • Rectangle Point Coverage CountsOpenAI · PHONE SCREEN · ONSITE INTERVIEWOpenAI interview questions
  • Sudoku Board ValidationConfluent · PHONE SCREEN · ONSITE INTERVIEWConfluent interview questions
  • Sparse Matrix MultiplicationByteDance · PHONE SCREENByteDance interview questions
  • Set Matrix ZeroesMicrosoft · ONSITE INTERVIEWMicrosoft interview questions

ZipRecruiter interview experiences

  • ZipRecruiter SWE OA, Level Not Reported: 23 Experiences
  • ZipRecruiter SWE Intern OA Scores: 4 Experiences
  • ZipRecruiter SWE New Grad OA: 9 Experiences
All ZipRecruiter interview questionsSee ZipRecruiter hiring insights
Saved
class Solution {
    public int[] findSymbolicPattern(int[][] matrix, String[][] pattern) {
        // Write your code here.
    }

}
Checking account…