SSplunk·DSAEngineerOnsite – Coding (Practical)
Fully Passable Rows and Columns in a Grid
Problem
Given a grid of '0' (passable) and '+' (blocked), return the indices of rows and columns that are entirely passable.
Example
rows/cols with all '0' -> their indices
Constraints
- 1 ≤ m,n ≤ 10^3
Approach
Row/column scans with boolean flags. Reported Splunk question.
added 6 days ago