-
-
Save parzibyte/11b6132f1758295f81f7a207b1fc098f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static Arbol obtenerArbol() { | |
String palabra = AyudanteDatos.solicitarPalabra(); | |
Arbol arbol = new Arbol(); | |
for (int i = 0; i < palabra.length(); i++) { | |
String letra = String.valueOf(palabra.charAt(i)); | |
if (!arbol.existe(letra)) { | |
arbol.insertar(letra); | |
} | |
} | |
return arbol; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment