// pred returns the in-order predecessor of node v.
pred returns the in-order predecessor of node v.
// pred returns the in - order predecessor of node v .
func (t *binTree) pred(v uint32) uint32 {
	if v == null {
		return null
	}
	u := t.max(t.node[v].l)
	if u != null {
		return u
	}
	for {
		p := t.node[v].p
		if p == null {
			return null
		}
		if t.node[p].r == v {
			return p
		}
		v = p
	}
}
func ( t * binTree ) pred ( v uint32 ) uint32 { if v == null { return null } u := t . max ( t . node [ v ] . l ) if u != null { return u } for { p := t . node [ v ] . p if p == null { return null } if t . node [ p ] . r == v { return p } v = p } }
pred returns the in-order predecessor of node v.
pred returns the in - order predecessor of node v .