Skip to content

Instantly share code, notes, and snippets.

View DanielTrindade's full-sized avatar
🎯
Focusing

Daniel Trindade DanielTrindade

🎯
Focusing
View GitHub Profile
@DanielTrindade
DanielTrindade / .py
Last active May 1, 2025 23:46
Melhorias para o exercício 2
def insere(arvore, valor):
if arvore is None:
arvore = cria_no(valor)
elif arvore['valor'] > valor:
arvore['esq'] = insere(arvore['esq'], valor)
else:
arvore['dir'] = insere(arvore['dir'], valor)
return arvore
def cria_arvore():