Minimum Operations to Reach Target Array
One operation picks a value x and overwrites every maximal run equal to x with the target entries at those positions. Find the fewest operations that make nums equal target.
One operation picks a value x and overwrites every maximal run equal to x with the target entries at those positions. Find the fewest operations that make nums equal target.