← All problemsSign in

Find SABA

Saba has an $n*m$ grid which contains lower case English letters. She wants to find out how many times does her name "saba" appear in it. It can be found horizontally, vertically, and diagonally in the grid? ### Input - First line: Two integer n and m, where n denotes (1 <= n,m <= 100) the number of rows and m denotes the number of columns in the grid - Next n lines: Each line must contain a stri

HINT LADDERno hints yet
L1 Observation
L2 Technique
L3 Approach
L4 Pseudo-code
🔒
L5 Full solution
L5 unlocks only if you insist twice
solution.cppC++17

CodeSearch Tutor

Hints, not spoilers — it won’t hand over the full solution unless you insist.

voice by Sarvam AI

Sign in to chat with the tutor and save your progress.

Sign in to start