Java:
Node successor (Node x) {
if(find(x)==null){
return null;
}
if (x.right!=null)
return minimum(x.right);
Node y = x.parent;
while (y!=null && x==y.rechts) {
x=y; y=y.parent;
}
return y;
}
Hallo ich möchte wenn die while schleife abbricht, also wenn es keinen Nachfolger gibt null returnen und nicht y ist das möglich?