you give 0indexed binary array num length n num divide index 0 n array possibly numsleft numsrightnumsleft element nums index 0 1 inclusive numsright element nums index n 1 inclusiveif 0 numsleft numsright element numsif n numsleft element num numsright emptythe division score index sum number 0s numsleft number 1s numsrightreturn distinct index high possible division score you return answer order Example 1input num 0010output 24explanation Division index 0 numsleft numsright 0010 the score 0 1 1 1 numsleft 0 numsright 010 the score 1 1 2 2 numsleft 00 numsright 10 the score 2 1 3 3 numsleft 001 numsright 0 the score 2 0 2 4 numsleft 0010 numsright the score 3 0 3indice 2 4 high possible division score 3note answer 42 acceptedexample 2input num 000output 3explanation Division index 0 numsleft numsright 000 the score 0 0 0 1 numsleft 0 numsright 00 the score 1 0 1 2 numsleft 00 numsright 0 the score 2 0 2 3 numsleft 000 numsright the score 3 0 3only index 3 high possible division score 3example 3input num 11output 0explanation Division index 0 numsleft numsright 11 the score 0 2 2 1 numsleft 1 numsright 1 the score 0 1 1 2 numsleft 11 numsright the score 0 0 0only index 0 high possible division score 2 Constraintsn numslength1 n 105numsi 0 1