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.
- Prepare
- Algorithms
- Graph Theory
- Repair Roads
- Discussions
Repair Roads
Repair Roads
+ 0 comments You should try copying the code from this website and see, I find it to be of good quality.
+ 0 comments JavaScript solution
function getMinCost(crew_id, job_id) { // Write your code here let cost = 0; const sortedCrew = crew_id.sort((a, b) => a - b); const sortedJob = job_id.sort((a, b) => a - b); for (let i = 0; i < crew_id.length; i++) { cost += Math.abs(sortedCrew[i] - sortedJob[i]); } return cost; }
+ 0 comments Here is my solution in java, javascript, python, C, C++, Csharp HackerRank Repair Roads Problem Solution
+ 0 comments I will soon have to develop a website to help my business flourish, and therefore a new design is necessary. I'm curious how I can achieve this. I read an article about this site amasty which assisted me in getting the development I needed. I recommend doing so if you need a website.
+ 0 comments Here is the solution of Repair Roads Click Here
Load more conversations
Sort 35 Discussions, By:
Please Login in order to post a comment