πDay 10. Minimum cost to connect all houses in a city π§
π‘ Problem Description:
π Example Walkthrough:
Example 1:
Input:
n = 5
houses[][] = [[0, 7], [0, 9], [20, 7], [30, 7], [40, 70]]Output:
105Explanation:
Example 2:
Input:
Output:
Explanation:
Constraints:
π― My Approach:
Optimized Primβs Algorithm
π Time and Auxiliary Space Complexity
π Solution Code
Code (C++)
Code (Java)
Code (Python)
π― Contribution and Support:
πVisitor Count
Last updated