give array integer num calculate pivot index arrayThe pivot index index sum number strictly leave index equal sum number strictly indexs rightIf index leave edge array leave sum 0 element leave this apply right edge arrayReturn leftmost pivot index if index exist return 1 example 1input num 173656output 3explanationthe pivot index 3left sum nums0 nums1 nums2 1 7 3 11right sum nums4 nums5 5 6 11example 2input num 123Output 1explanationthere index satisfie condition problem statementexample 3input num 211Output 0explanationthe pivot index 0left sum 0 element leave index 0right sum nums1 nums2 1 1 0 constraints1 numslength 1041000 numsi 1000 note this question 1991 httpsleetcodecomproblemsfindthemiddleindexinarray