if right[x] != NIL then return TREE-MINIMUM(right[x]) y<-p[x] while y!= NIL and x = right[y] do x<-y y<-p[y] return y
I know that "if right [x]! = NIL, then return tree-min" and I translated it into:
if(p->RChild) return fMinValue(p->RChild);
Otherwise, I have problems with understanding.
binary-search-tree
Azreal
source share