function to create a new node
| 15 | |
| 16 | // function to create a new node |
| 17 | Node *newNode(int key) |
| 18 | { |
| 19 | Node *node = new Node(); |
| 20 | node->left = node->right = NULL; |
| 21 | node->data = key; |
| 22 | return node; |
| 23 | } |
| 24 | |
| 25 | // function should print the topView of |
| 26 | // the binary tree |