Given an integer array arr, in each operation you can choose a palindromic subarray and remove it from arr. Once a subarray is removed, the remaining elements to its left and right are concatenated to form a single array.
Return the minimum number of operations required to completely remove all elements from arr.
Constraints:
arr.length
arr[i]
Given an integer array arr, in each operation you can choose a palindromic subarray and remove it from arr. Once a subarray is removed, the remaining elements to its left and right are concatenated to form a single array.
Return the minimum number of operations required to completely remove all elements from arr.
Constraints:
arr.length
arr[i]