Digit Occurrences

Python 2, 149 148 121 116 111 107 bytes

lambda l:[sum([any,sum][len(l)%2](map(`n`.count,`abs(v)`))for n in l[:i:2*(v<0)-1])for i,v in enumerate(l)]

Try it online!


Java (JDK 10), 204 bytes

a->{int l=a.length,r[]=new int[l],i=0,j,x,y,b,s,t=10;for(;i<l;i++)for(j=i+(s=a[i]>0?1:-1);0<=j&j<l;j+=s)for(b=0,x=a[i];x!=0;x/=t)for(y=a[j];b<1&y!=0;y/=t)if(x%t==-y%t|x%t==y%t){r[i]++;b+=1-l%2;}return r;}

Try it online!

Credits

  • -6 bytes thanks to Kevin Cruijssen
  • -1 byte thanks to Java Gonzar

Perl 6, 100 85 bytes

{.kv.map:{sum map (?*,+*)[$_%2],.[grep (*-$^i)*$^v>0,^$_].map:{.comb⊍$v.abs.comb}}}

Try it online!

Uses the baggy multiplication operator ⊍.