← Microsoft questions

Search word in 2D grid with 8-direction zig-zag traversal

Filed under Microsoft

Given a 2D grid of characters and a target word, determine if the word exists in the grid. Movement is allowed in all 8 directions, and the path must be a zig-zag (cannot reuse the same cell).

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 Microsoft questions

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