Skip to content
GATEiit

GATE CSE 2024 Session 2 Q10: Fill the last row of a 4×4 neighbour-count grid

Question

In the 4×44 \times 4 array shown below, each cell of the first three rows has either a cross (X) or a number.

1X43
X554
3X6X

The number in a cell represents the count of the immediate neighboring cells (left, right, top, bottom, diagonals) NOT having a cross (X). Given that the last row has no crosses (X), the sum of the four numbers to be filled in the last row is

Try it: multiple choice: exactly one correct option

Select one option
Wrong answer costs 2/3 mark in GATE.
Show answer and explanation

Answer: A (official GATE 2024 final answer key)

Concept used: Counting the non-cross neighbours (up to 8) of each cell, minesweeper style.

First step: Row 3 is 3, X, 6, X; for each last-row cell count its non-X neighbours in row 3 and in row 4 itself.

Full step-by-step solution

Detailed working, common mistakes and linked mock tests will be available with a free GATEiit account. Log-in is coming soon.

Share this question

WhatsAppDownload image

Source: official GATE 2024 Session 2 CS question paper and final answer key, organised by IISc Bangalore. Question paper · Answer key