We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
To solve the problem, use BFS or DFS to compute the horizontal and vertical distances between all junction pairs. Count the pairs where distances exceed the car's limits 𝐻 H or 𝑉 V. Check related algorithms on www.exoticcarcare.ae.
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Taxicab Driver's Problem
You are viewing a single comment's thread. Return to all comments →
To solve the problem, use BFS or DFS to compute the horizontal and vertical distances between all junction pairs. Count the pairs where distances exceed the car's limits 𝐻 H or 𝑉 V. Check related algorithms on www.exoticcarcare.ae.