Array A= [1,0,1,1,1,1,0,1,1]]; And the result will be B B=[1,0,4,3,2,1,0,2,1]; the elements of A is given and the result will be B. Elements in A can only be 0 and 1. we need to count backward from the last element in A, if there are consecutive 1's then the element in A and B will be 1 but for the 2nd consecutive 1 in A it will be 2 in be and for the 3rd one in A the element will be 3 in B but for 0 it will be 0. I have tried the following way but I am not getting the output.Array A= [1,0,1,1,1,1,0,1,1]]; And the result w