Count OPTIVER Occurrences in a Character Grid

Given a 2D character grid grid (a vector<string>) containing only uppercase English letters, count the total number of occurrences of the word OPTIVER.

An occurrence may appear in one of the fo...

Example

Unlock to view complete problem details

and practice with sample input/output

Was this article helpful?

View Test Cases & Run Code requires membership

Standard Input
Execution Result: