Clarity on cases for flood fill

As mentioned in the hint video, why are we adding 1 to min result? What if the color of the inner segment is same as the ending colors?

@bitbeast hey think in form of recursion,as we have remove consecutive so if l and r are equal so ask recursion to merge from l+1 to r-1 ,now we have to also convert that merge part to l and r so one is added to it.Similiarly for the cases when l and r not equal.Hope you get it.

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.