| 42 | } |
| 43 | |
| 44 | int main(){ |
| 45 | |
| 46 | Tree *root = newNode(20); |
| 47 | root->left = newNode(8); |
| 48 | root->right = newNode(22); |
| 49 | root->left->left = newNode(5); |
| 50 | root->left->right = newNode(3); |
| 51 | root->right->left = newNode(4); |
| 52 | root->right->right = newNode(25); |
| 53 | root->left->right->left = newNode(10); |
| 54 | root->left->right->right = newNode(14); |
| 55 | |
| 56 | setHorizontalDistance(root, 0); |
| 57 | |
| 58 | map<int, pair<int, int>>m; |
| 59 | bottomView(root, m, 1); |
| 60 | |
| 61 | for(auto x: m){ |
| 62 | cout<<x.second.second<<" "; |
| 63 | } |
| 64 | |
| 65 | |
| 66 | |
| 67 | return 0; |
| 68 | } |
nothing calls this directly
no test coverage detected