← All problemsSign in

Moving Grid(keteki)

Given a 2D grid of characters and another 2D resultant grid. A cell is filled if it has the character '#', else its a '.'. Petra, uses the arrow keys of his keyboard to move the entire grid of characters. Print "U", "D", "L", "R" if up or down or left or right arrow was clicked respectively. Print -1 if it can't be determined. When an arrow is clicked a new row or column is formed that has empt

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