← All problemsSign in

Best Buy

Chef wants to move to a new street where he can reach his destinations easily (school, gym, office). So chef decided to buy a house in the street. Now chef is asking you to suggest best house he could buy to reach school, gym and office as fast as possible. Find a house such that house - gym + house - school + house - office distance is minimum. Given a binary matrix of size $3$X$N$ size where ea

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