← All problemsSign in

Sherlock is back!!

Sherlock is following N criminals, which are right now in a 2D grid. Each criminal at t=0, decides to move in a certain fixed direction. Each criminal moves with the same speed. These fixed directions are North, East, West and South. Two or more criminals, however, vanish whenever they meet at any place at the same time, t>0. You have to tell what is the final number of criminals left at t=infinit

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