Quick Overview

Count how many times a target word appears in a grid of letters when read in a straight line along a row or down a column, with no turns and overlapping matches counted separately. It tests careful grid traversal, boundary handling, precise occurrence counting rules and efficient string matching.

Count Straight-Line Occurrences of a Word in a Letter Grid, Rows and Columns Only

Company: Optiver

Role: Software Engineer

Category: Coding & Algorithms

Difficulty: medium

Interview Round: Online Assessment

Overview: Count how many times a target word appears in a grid of letters when read in a straight line along a row or down a column, with no turns and overlapping matches counted separately. It tests careful grid traversal, boundary handling, precise occurrence counting rules and efficient string matching.

Loading…