Data update
This commit is contained in:
parent
0df55f9f24
commit
aec8ed51b6
1045 changed files with 18889 additions and 2777 deletions
|
|
@ -0,0 +1,20 @@
|
|||
Type BinaryTree
|
||||
valor As Integer
|
||||
izda As BinaryTree Ptr
|
||||
dcha As BinaryTree Ptr
|
||||
End Type
|
||||
|
||||
Sub PrintTree(t As BinaryTree Ptr, depth As Integer)
|
||||
If t = 0 Then Exit Sub
|
||||
Print String(depth, Chr(9)); t->valor
|
||||
PrintTree(t->izda, depth + 1)
|
||||
PrintTree(t->dcha, depth + 1)
|
||||
End Sub
|
||||
|
||||
Dim As BinaryTree b = Type(6)
|
||||
Dim As BinaryTree bLeft = Type(5)
|
||||
Dim As BinaryTree bRight = Type(7)
|
||||
b.izda = @bLeft
|
||||
b.dcha = @bRight
|
||||
|
||||
PrintTree(@b, 0)
|
||||
Loading…
Add table
Add a link
Reference in a new issue