Skip to content

Instantly share code, notes, and snippets.

@parzibyte
Created May 8, 2020 07:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save parzibyte/8de7d7729d40da7bebb76176171ec065 to your computer and use it in GitHub Desktop.
Save parzibyte/8de7d7729d40da7bebb76176171ec065 to your computer and use it in GitHub Desktop.
Arbol arbol = new Arbol();
arbol.insertar(1);
arbol.insertar(2);
arbol.insertar(3);
arbol.insertar(4);
arbol.insertar(0);
System.out.println("Recorriendo inorden:");
arbol.inorden();
System.out.println("Recorriendo postorden:");
arbol.postorden();
System.out.println("Recorriendo preorden:");
arbol.preorden();
System.out.println(arbol.existe(1)); // true
System.out.println(arbol.existe(7)); // false
System.out.println(arbol.existe(0)); // true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment