← Amazon questions

Search string in 2D character matrix in eight directions

Filed under Amazon

Given a 2D matrix of characters and a search string, check if the string exists by moving in any of the eight cardinal and diagonal directions. Return the starting coordinate (row, col) of the first…

You've read your 3 free write-ups

Sign up free to keep reading. Your account opens the first 10 questions of every company.

Related Amazon questions

Collected from public candidate posts and coding forums. Updated Nov 2026.