()
| 619 | } |
| 620 | |
| 621 | func (n *SweepNode) updateHeight() { |
| 622 | n.height = 0 |
| 623 | if n.left != nil { |
| 624 | n.height = n.left.height |
| 625 | } |
| 626 | if n.right != nil && n.height < n.right.height { |
| 627 | n.height = n.right.height |
| 628 | } |
| 629 | n.height++ |
| 630 | } |
| 631 | |
| 632 | func (n *SweepNode) swapChild(a, b *SweepNode) { |
| 633 | if n.right == a { |