LeetCode
Pyramid Transition Matrix
Click
here
for an explanation.