| 27 | |
| 28 | template <typename T> |
| 29 | int balanceFactor(Node<T> *p){ |
| 30 | int hl, hr; |
| 31 | hl = p && p -> lchild ? p -> lchild -> height : 0; |
| 32 | hr = p && p -> rchild ? p -> rchild -> height : 0; |
| 33 | |
| 34 | return hl - hr; |
| 35 | } |
| 36 | |
| 37 | template <typename T> |
| 38 | Node<T>* LLRotation(Node<T>* p){ |
no outgoing calls
no test coverage detected