a
This commit is contained in:
@@ -424,14 +424,13 @@ public class Baum<T extends Comparable<T>>
|
|||||||
// return out;
|
// return out;
|
||||||
// }
|
// }
|
||||||
|
|
||||||
private int hoeheRek(final Knoten<T> einKnoten)
|
private int hoeheRek(final Knoten<T> einKnoten) {
|
||||||
{
|
|
||||||
|
|
||||||
if(einKnoten == null){
|
int hoehe = 0;
|
||||||
return 0;
|
|
||||||
|
if (einKnoten != null) {
|
||||||
|
return Math.max(hoeheRek(einKnoten.getKnotenRechts()), hoeheRek(einKnoten.getKnotenLinks())) + 1;
|
||||||
}
|
}
|
||||||
|
return hoehe;
|
||||||
|
|
||||||
return Math.max(hoeheRek(einKnoten.getKnotenRechts(),hoeheRek(einKnoten.getKnotenLinks());
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user