Confusion regarding expected output


#1

A : “cac”
B : “??a?"
Here using "
??” we can ignore the first “c”, and then “a?” matches with “ac”, so expected output is 1.
But given output for the above input is 0.
Can anybody explain.


#2

Solved, my mistake, I assumed incorrectly