FastPrepCompletely Passable Grid Lines
Problems/Completely Passable Grid Lines

Completely Passable Grid Lines

Splunk logoSplunk● EasyFULLTIMEPHONE SCREEN

Updated Nov 2026

QuestionFunctionExamplesConstraints

Problem statement

Source note: Reported in a Splunk phone screen. The report asks for the indexes of rows and columns that are all zero in a grid of passable and impassable cells. We chose a rectangular grid, the order of the indexes, and the limits. Our version is about 96% the same as the reported question.

You are given a non-empty rectangular grid of characters. A 0 is passable and a + is impassable.

Return a two-element list. Its first list contains, in increasing order, every zero-based row index whose cells are all passable. Its second list contains, in increasing order, every zero-based column index whose cells are all passable.

Function

passableLines(grid: String[]) → List<List<Integer>>

Examples

Example 1

grid = ["000","0+0","000"]return = [[0,2],[0,2]]
grid
012000010+02000

Rows 0 and 2 and columns 0 and 2 contain only passable cells.

Example 2

grid = ["++","++"]return = [[],[]]
grid
010++1++

No row or column is completely passable.

Constraints

  • 1 <= grid.length.
  • 1 <= grid[i].length.
  • Every row has the same length.
  • The grid contains at most 4,096 cells.
  • Every cell is 0 or +.

More Splunk Phone Screen questions

  • Nearest Reachable Grid CornerPHONE SCREEN · Seen Aug 2025
  • One-Roll Teleporter LandingsPHONE SCREEN · Seen Aug 2025
  • Repeated-Roll Teleporter ReachabilityPHONE SCREEN · Seen Aug 2025

Similar questions at other companies

  • Validate a Chess Bishop, Rook, or Queen MoveGlean · PHONE SCREENGlean interview questions
  • One-Nearest-Neighbor Classification with Manhattan DistanceOpenAI · PHONE SCREENOpenAI interview questions
  • Unique Pairs in a 2D Matrix Summing to TargetAmazon · PHONE SCREEN
  • Map Black Cells to Covering 2x2 BlocksSquare · PHONE SCREEN
  • Trace an Eight-Direction Robot Until BlockedPinterest · PHONE SCREENPinterest interview questions
  • Excel Training Data and Model Response AuditMicrosoft · PHONE SCREENMicrosoft interview questions
  • Count Connect-Four Scoring LinesBloomberg LP · PHONE SCREENBloomberg LP interview questions
  • Target Cells in One Block per Row and ColumnWhatNot · PHONE SCREENWhatNot interview questions
  • Mark a Queen’s Attack BoardMotive · PHONE SCREENMotive interview questions
  • Multiply Two MatricesAdobe · PHONE SCREENAdobe interview questions
All Splunk interview questionsSee Splunk hiring insights
Saved
class Solution {
    public java.util.List<java.util.List<Integer>> passableLines(String[] grid) {
        // Return [passableRows, passableColumns].
    }
}
Checking account…