laziness, impatience, and hubris | |
PerlMonks |
Re: compute paths in Pascal's triangle (aka Tartaglia's one) (2 updates)by LanX (Saint) |
on Mar 22, 2018 at 12:23 UTC ( [id://1211514]=note: print w/replies, xml ) | Need Help?? |
The confusing "problem" is the coordinate system, it's trivial if you change it to left-down and right-down moves
You see in your system:
This algorithm is fixing it by recalculating the remaining left-down moves
updatein hindsight it's probably better implemented in the new coordinate system and only the results are transformed back. The code is much easier then.
Cheers Rolf
In Section
Seekers of Perl Wisdom
|
|