2422. Merge Operations to Turn Array Into a Palindrome
ArrayTwo PointersGreedy
Hints
Hint 1
Can you find how many operations are needed to make the first element of the array equal to the last element?
Hint 2
Notice that you can use the same idea of the previous hint to make the second element equal to the second last one.
Hint 3
Use the same idea until all elements of the array are used.
Preparing judge…