← All problemsSign in

Placement of Blocks in a 2D Matrix

Ron has been assigned a simple problem in his class. He has been given a 2D square Matrix and the indexing starts from 0. Each cell of the matrix contains either 0 or 1 where 0 represents empty cell and 1 represents a block present in the cell. As per the instruction provided, a block can be placed only at the cell with both row and column value being odd, for example, (1,1), (3,3), etc. Ron needs

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