diff options
| author | Roger Bell_West <roger@firedrake.org> | 2021-08-09 18:29:58 +0100 |
|---|---|---|
| committer | Roger Bell_West <roger@firedrake.org> | 2021-08-09 18:29:58 +0100 |
| commit | 62886f842bcb91f8367217da8b9662cefbd3088f (patch) | |
| tree | 067565bbf9b2af6f2ae07cdd1a1d170a0ea2ffa0 | |
| parent | 7114102c500fcc0ce6e7d9340bad7ba3407b175b (diff) | |
| download | perlweeklychallenge-club-62886f842bcb91f8367217da8b9662cefbd3088f.tar.gz perlweeklychallenge-club-62886f842bcb91f8367217da8b9662cefbd3088f.tar.bz2 perlweeklychallenge-club-62886f842bcb91f8367217da8b9662cefbd3088f.zip | |
syntax
| -rw-r--r-- | challenge-125/roger-bell-west/postscript/ch-2.ps | 24 |
1 files changed, 0 insertions, 24 deletions
diff --git a/challenge-125/roger-bell-west/postscript/ch-2.ps b/challenge-125/roger-bell-west/postscript/ch-2.ps index 94731bac34..175b9e02ef 100644 --- a/challenge-125/roger-bell-west/postscript/ch-2.ps +++ b/challenge-125/roger-bell-west/postscript/ch-2.ps @@ -1,29 +1,5 @@ %! no DSC -% def btd(tree) -% st=tree.length -% depth=Array.new(st,0) -% diameter=Array.new(st,0) -% (st-1).downto(0) do |i| -% if tree[i] != 0 then -% a=i*2+1 -% b=a+1 -% if b < st then -% depth[i]=1+[depth[a],depth[b]].max -% diameter[i]=[ -% 1+depth[a]+depth[b], -% diameter[a], -% diameter[b], -% ].max -% else -% depth[i]=1 -% diameter[i]=1 -% end -% end -% end -% return diameter[0] -% end - /max2 { dup % a b b 3 2 roll % b b a |
