| 12 | }; |
| 13 | |
| 14 | class BST |
| 15 | { |
| 16 | private: |
| 17 | Node *root; |
| 18 | |
| 19 | public: |
| 20 | BST() { root = nullptr; } |
| 21 | Node *getRoot() { return root; } |
| 22 | void iInsert(int key); |
| 23 | void Inorder(Node *p); |
| 24 | Node *iSearch(int key); |
| 25 | Node *rInsert(Node *p, int key); |
| 26 | Node *rSearch(Node *p, int key); |
| 27 | Node *Delete(Node *p, int key); |
| 28 | int Height(Node *p); |
| 29 | Node *InPre(Node *p); |
| 30 | Node *InSucc(Node *p); |
| 31 | void createFromPreorder(int pre[], int n); |
| 32 | }; |
| 33 | |
| 34 | void BST::iInsert(int key) |
| 35 | { |
nothing calls this directly
no outgoing calls
no test coverage detected