Skip to content

Commit

Permalink
Exercício de árvore, enunciado
Browse files Browse the repository at this point in the history
  • Loading branch information
renzon committed Apr 20, 2017
1 parent 8bb55c5 commit dd4f100
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions exercicios/arvore.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
class Arvore:
'''
>>> for noh in Arvore(0, Arvore(-2, Arvore(-4), Arvore(-3)), Arvore(
10)):
... print(noh)
-4
-1
-2
0
10
'''

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



# 0
# -2 10
# -4 -1

0 comments on commit dd4f100

Please sign in to comment.