← Samsung questions

Search word in 2D grid in all directions

Filed under Samsung

Given a 2D grid of characters and a word, count the number of occurrences of the word by searching in all 8 possible directions (horizontal, vertical, and diagonal).

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

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