Skip to main content
1 of 4
Rod
  • 18.6k
  • 4
  • 32
  • 89

Python 2, 140 bytes

n=input() x=[[0,]*n+[1]+n*[0,]] z=n%2 exec'x+=[[(i%2^z)*sum(x[-1][i-1:i+2])for i in range(2*n+1)]];z^=1;'*(n-1) print map(sum,zip(*x))[1:-1] 

Try it online! or Try all test cases

Rod
  • 18.6k
  • 4
  • 32
  • 89