Time for an 2014 update…
This commit is contained in:
parent
372c577f83
commit
09687c4926
2520 changed files with 34227 additions and 7318 deletions
1
Task/Visualize-a-tree/Batch-File/visualize-a-tree.bat
Normal file
1
Task/Visualize-a-tree/Batch-File/visualize-a-tree.bat
Normal file
|
|
@ -0,0 +1 @@
|
|||
@tree %cd%
|
||||
14
Task/Visualize-a-tree/Icon/visualize-a-tree.icon
Normal file
14
Task/Visualize-a-tree/Icon/visualize-a-tree.icon
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
procedure main(A)
|
||||
showTree("", " -", [1, [2,[3],[4,[5],[6]],[7,[11]]], [8,[9,[10]]] ])
|
||||
write()
|
||||
showTree("", " -", [1, [2,[3,[4]]], [5,[6],[7,[8],[9]],[10]] ])
|
||||
end
|
||||
|
||||
procedure showTree(prefix, lastc, A)
|
||||
write(prefix, lastc, "--", A[1])
|
||||
if *A > 1 then {
|
||||
prefix ||:= if prefix[-1] == "|" then " " else " "
|
||||
every showTree(prefix||"|", "-", !A[2:2 < *A])
|
||||
showTree(prefix, "`-", A[*A])
|
||||
}
|
||||
end
|
||||
Loading…
Add table
Add a link
Reference in a new issue