ich sitze schon seit Tagen an einer alten Klausuraufgabe. Gegeben ist:
Code (Java):
public class Graph
{
boolean [][] matrix;
boolean [] besucht;
...
public boolean istBaum()
{
besucht = new boolean[matrix.length];
return istBaum(0);
}
public boolean istBaum(int knoten)
{
}
}
{
boolean [][] matrix;
boolean [] besucht;
...
public boolean istBaum()
{
besucht = new boolean[matrix.length];
return istBaum(0);
}
public boolean istBaum(int knoten)
{
}
}
Überprüfen, ob eine 2D Matrix ein Baum ist
Überprüfen, ob eine 2D Matrix ein Baum ist
0 commentaires:
Enregistrer un commentaire