#3698
Split Array With Minimum Difference
expert · 1095 · lc medium +32 · 33.6% accepted · 101 likes · top 11%
Description
Given an integer array nums, split it into exactly two subarrays left (strictly increasing) and right (strictly decreasing) and return the minimum absolute difference between their sums, or -1 if no valid split exists.
Code
1
2
3