you give 0indexed integer array num consist 3 n elementsYou allow remove subsequence element size exactly n num the remain 2 n element divide equal partsthe n element belong sum sumfirstThe n element belong second sum sumsecondthe difference sum part denote sumfirst sumsecondFor example sumfirst 3 sumsecond 2 difference 1similarly sumfirst 2 sumsecond 3 difference 1return minimum difference possible sum part removal n element Example 1input num 312output 1explanation here num 3 element n 1 thus remove 1 element num divide array equal part if remove nums0 3 array 12 the difference sum part 1 2 1 if remove nums1 1 array 32 the difference sum part 3 2 1 if remove nums2 2 array 31 the difference sum part 3 1 2the minimum difference sum part min112 1 Example 2input num 795813output 1explanation here n 2 so remove 2 element divide remain array part contain element eachIf remove nums2 5 nums3 8 resultant array 7913 the difference sum 79 13 12to obtain minimum difference remove nums1 9 nums4 1 the resultant array 7583 the difference sum part 75 83 1it show possible obtain difference small 1 constraintsnumslength 3 n1 n 1051 numsi 105