Assume the array has [0 0 1 1 1 0 0 0 0 1 1 0 1 1 1]
I would like to store 1's that has been repeated. As the example above, I would like to store 111 into an array and 11 into another.
My expected output should be
arr[3]=2 //means continuous of 1 has been 3 times and been encountered 2 times
arr[2]=1 //continuous of 1 is 2 times in length and been encountered once