Knuth's power tree: Difference between revisions

Content added Content deleted
m (J: make efficiency note better match task notation)
m (J: bugfix (posted version of code didn't handle 0 exponents properly))
Line 81: Line 81:


<lang J>kpt=:3 :0
<lang J>kpt=:3 :0
L=: %P=: (1+y){.1 1
L=: %P=: (1+y){.0 1
for_n. 1+i.y do.
for_n. 1+i.y do.
findpath=: [: |. {&P^:a:
findpath=: [: |. {&P^:a: