How would you solve the return value for this array: [ 0, 0, 0, 0, 0, 0, 0, 0, 0 ]. Answer is 28


#1

Comment body goes here.


#2

values indicate no of zeros in first ,second,third subarray respectively…
[1 1 7] [1 7 1] [7 1 1] total permutation=3
[1 2 6] [1 6 2] [2 1 6] [2 6 1] [6 1 2] [6 2 1] total permutation=6
[1 3 5] similarly permutation =6
[1 4 4 ] =3
[2 2 5] =3
[3 2 4] =6
[3 3 3] =1
total =28;