Given an array of integers nums, you can perform any of the following actions in a single operation if nums contains at least
Delete the first two elements of nums, with a score equal to their sum.
Delete the last two elements of nums, with a score equal to their sum.
Delete the first element and the last element of nums, with a score equal to their sum.
The score of each operation must be identical for all performed operations.
Return the maximum number of operations that can be performed such that all operations have the same score.
Constraints:
nums.length
nums[i]
Given an array of integers nums, you can perform any of the following actions in a single operation if nums contains at least
Delete the first two elements of nums, with a score equal to their sum.
Delete the last two elements of nums, with a score equal to their sum.
Delete the first element and the last element of nums, with a score equal to their sum.
The score of each operation must be identical for all performed operations.
Return the maximum number of operations that can be performed such that all operations have the same score.
Constraints:
nums.length
nums[i]