← All problemsSign in

AVOID COLLISION

Chef has come up with an idea to avoid collisions on racing tracks. He wants to separate the closest cars by a certain distance. Chef has come with the ideal distance and technology to separate the cars automatically. All that now needs to be done is to find the closest cars. Help Chef find the least separation between all the cars given $X$ and $Y$ coordinates of $N$ cars. $X_i$ and $Y_i$ represe

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