mediumArrayDynamic Programming 0 views
Count Beautiful Splits in an Array
You are given an array nums.
You are given an array nums.
A split of an array nums is beautiful if:
Return the number of ways you can make this split.
Example 1
Input: nums = [1,1,2,1]
Output: 2
Explanation: The beautiful splits are:
Example 2
Input: nums = [1,2,3,4]
Output: 0
Explanation: There are 0 beautiful splits.
Constraints
- 1 <= nums.length <= 5000
- 0 <= nums[i] <= 50
Hints
Companies
No companies reported yet.
Discussion
Sign in to join the discussion.
Loading discussion...
Test results
No test cases yet.