func (n *Treap[T]) Find(v T, c CompareFn[T]) *Treap[T] {
	for {
		if n == nil {
			return nil
		}
		diff := c(n.Value, v)
		switch {
		case diff == 0:
			return n
		case diff < 0:
			n = n.Right
		case diff > 0:
			n = n.Left
		}
	}
}
// Find finds the node in the treap with matching value
Find finds the node in the treap with matching value
// Find finds the node in the treap with matching value
func (n *Treap[T]) Find(v T, c CompareFn[T]) *Treap[T] {
	for {
		if n == nil {
			return nil
		}
		diff := c(n.Value, v)
		switch {
		case diff == 0:
			return n
		case diff < 0:
			n = n.Right
		case diff > 0:
			n = n.Left
		}
	}
}
func ( n * Treap [ T ] ) Find ( v T , c CompareFn [ T ] ) * Treap [ T ] { for { if n == nil { return nil } diff := c ( n . Value , v ) switch { case diff == 0 : return n case diff < 0 : n = n . Right case diff > 0 : n = n . Left } } }
Find finds the node in the treap with matching value
Find finds the node in the treap with matching value