FastPrepFind Zero Cells in a 2×2 Grid
Problems/Find Zero Cells in a 2×2 Grid

Find Zero Cells in a 2×2 Grid

Roblox logoRoblox● EasyFULLTIMEOA

Updated Nov 2026

QuestionFunctionExamplesConstraints

Problem statement

Source note: Reported in a Roblox full-time online assessment. The report asks to find the zeros in a 2×2 grid. We chose whole-number cell values and zero-based coordinates in row-by-row order. Our version is about 85% the same as the reported question.

You are given an integer grid with exactly two rows and two columns. Find every cell whose value equals 0.

For this exercise, assume the result contains zero-based coordinate pairs [row, column], ordered by increasing row and then increasing column. Return an empty array when the grid contains no zeros. Inspect cells independently; neighboring zeros still produce separate coordinate pairs.

Function

findZeroCells(grid: int[][]) → int[][]

Examples

Example 1

grid = [[0,4],[3,0]]return = [[0,0],[1,1]]
grid
01004130
→
return
01000111
Moved or new

The zero cells are the top-left and bottom-right cells.

Example 2

grid = [[5,1],[9,2]]return = []
grid
01051192

Every value is nonzero, so the result is empty.

Example 3

grid = [[0,0],[0,0]]return = [[0,0],[0,1],[1,0],[1,1]]
grid
01000100
→
return
01000101210311

All four cells are reported in row-major order.

Constraints

  • grid.length = 2.
  • grid[0].length = grid[1].length = 2.
  • -10^9 <= grid[row][column] <= 10^9.

More Roblox Online Assessment questions

  • Centered Block Placement QueriesOA · Seen Oct 2026
  • Robot Navigation Around LasersOA · Seen Oct 2026
  • Factory Batch Profit (Game Adaptation)OA · Seen Sep 2026
  • Nested Recipe Blocks (Game Adaptation)OA · Seen Sep 2026
  • Vehicle Builds for Required Terrain (Game Adaptation)OA · Seen Sep 2026
  • Track Received Byte RangesOA · Seen Sep 2026
  • Inventory Discount TrackerOA · Seen Sep 2026
  • Break a PalindromeOA · Seen Jun 2026
  • Count Pairs Differing in One DigitOA · Seen Oct 2025
  • Cat Route Budget Planning (Game Adaptation)OA · Seen Aug 2025

Similar questions at other companies

  • Survey Table: Group Given an AnswerSusquehanna International Group (SIG) · OASusquehanna International Group (SIG) interview questions
  • Wind-Blown Leaves Remaining in a GridAbridge · OAAbridge interview questions
  • Query a Header-Encoded MatrixNVIDIA · OANVIDIA interview questions
  • Count Pieces After Othello MovesHudson River Trading · OAHudson River Trading interview questions
  • Trapped Characters in a GridAdobe · OAAdobe interview questions
  • Center Crop a Grayscale ImageLuma AI · OALuma AI interview questions
  • Make Pixel Columns Strictly IncreasingMicrosoft · OAMicrosoft interview questions
  • Check Matrix Reflection SymmetryIntuit · OAIntuit interview questions
  • Tic-Tac-Toe Board StatusPinecone · OA
  • Cherry PickupInfosys · OAInfosys interview questions

Interview reports that mention this question

  • Roblox OA: What It Tests (2026)
  • Roblox New Grad OA and Interviews: 137 Experiences (Part 1 of 7)

Roblox interview experiences

  • Roblox New Grad Early OA Tasks: 10 Experiences (Part 7 of 7)
  • Roblox New Grad Engineer Rounds: 13 Experiences (Part 6 of 7)
  • Roblox New Grad HackerRank OA: 18 Experiences (Part 5 of 7)
  • Roblox New Grad CodeSignal Finals: 23 Experiences (Part 4 of 7)
All Roblox interview questionsSee Roblox hiring insights
Saved
class Solution {
    public int[][] findZeroCells(int[][] grid) {
        // write your code here
    }

}
Checking account…