you give array arr consist zeros one divide array nonempty part part represent binary valueif possible return j 1 j thatarr0 arr1 arri partarri 1 arri 2 arrj 1 second andarrj arrj 1 arrarrlength 1 partAll part equal binary valuesif possible return 1 1note entire consider binary value represent for example 110 represent 6 decimal 3 also lead zero allow 011 11 represent value Example 1input arr 10101output 03Example 2Input arr 11011output 11example 3Input arr 11001output 02 constraints3 arrlength 3 104arri 0 1