Skip to content

Commit

Permalink
2.1 - Implementação
Browse files Browse the repository at this point in the history
  • Loading branch information
vbuxbaum committed Apr 3, 2021
1 parent 8d486f8 commit 681f94f
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions 2_paradigmas/1_arvore_central.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
class ArvoreBinaria:
def __init__(self):
self.raiz = self.No()

def central(cls, no_pesquisado):
if no_pesquisado is not None:
cls.central(no_pesquisado.esquerda)
print(no_pesquisado.valor)
cls.central(no_pesquisado.direita)

class No:
def __init__(self):
self.valor = None
self.esquerda = None
self.direita = None

0 comments on commit 681f94f

Please sign in to comment.