1/28
Loading...
🌧️Rainy Morning!
Sudden rain at the apartment! Some of 7 units have no umbrella and can't commute... Help!
Loading...
Sudden rain at the apartment! Some of 7 units have no umbrella and can't commute... Help!
Sudden rain at the apartment leaves some residents without umbrellas. Residents with spare umbrellas can only lend to immediately adjacent units. Find the maximum number of residents who can commute.
n = 7, lost = [2, 3, 5, 7], reserve = [1, 3, 4, 6]
7
Unit 3 has spare but lost, uses their own. 1→2, 4→5, 6→7 lending. All 7 can commute!