You are given an integer array nums.
A split of the array nums into three non-empty contiguous subarrays nums1, nums2, and nums3 is called beautiful if their concatenation forms nums and at least one of the following conditions holds:
nums1 is a prefix of nums2.
nums2 is a prefix of nums3.
Return the total number of beautiful splits of nums.
Constraints:
nums.length
nums[i]
You are given an integer array nums.
A split of the array nums into three non-empty contiguous subarrays nums1, nums2, and nums3 is called beautiful if their concatenation forms nums and at least one of the following conditions holds:
nums1 is a prefix of nums2.
nums2 is a prefix of nums3.
Return the total number of beautiful splits of nums.
Constraints:
nums.length
nums[i]