"if the current color's index is same as min1, then we have to go with min2"
I can not understand this sentence.
House 0, [color3]
House 1, [min1 color2, min2, color3]
House 2, [min1 color2, min2 color5]
If House 1 and House 2 both have min1 color2, for House1, you can not go to color3, because House0 is color3.
Can anyone explain this sentence please?