sir, why we starting from both corner of array…
Floodf fill (1-d dp)
@Einsteve7974 we have simplified our code into three cases.if we see that our first and last element is same we can conveniently add 1 and move to the shorter array.similarly if its not same ,we can merge either and go fwd with the min moves.this way we have broken up our dp