you give 0indexed integer array nums length nnum contain valid split index follow truethe sum 1 element greater equal sum n 1 elementsthere element right that 0 n 1return number valid split num Example 1input num 10487output 2explanation there way split num nonempty part Split num index 0 then 10 sum 10 the second 487 sum 3 since 10 3 0 valid split Split num index 1 then 104 sum 14 the second 87 sum 1 since 14 1 1 valid split Split num index 2 then 1048 sum 6 the second 7 sum 7 since 6 7 2 valid splitthu number valid split num 2example 2input num 2310output 2explanation there valid split num Split num index 1 then 23 sum 5 the second 10 sum 1 since 5 1 1 valid split Split num index 2 then 231 sum 6 the second 0 sum 0 since 6 0 2 valid split constraints2 numslength 105105 numsi 105