← All problemsSign in

Bob the Plumber

Bob the builder quits his job and moves to Townsville. Here bob takes up a job as plumber. Bob is working on a project. There are N houses in the city of Townsville. He has been given a job by the mayor to lay the water pipeline for the entire city. As mayor is a Marwari (no offence), he wants Bob to complete the task in minimum cost possible. Bob is given the map of Townsville. The map shows conn

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