CS301p Assignment 2 Solution Spring 2023
CS301p Assignment 2 Solution Spring 2023
CS301p Assignment 2 Solution Spring 2023
#include <iostream>
#include <stack>
using namespace std;
TreeNode(T data) {
this->data = data;
left = NULL;
right = NULL;
}
int main() {
stack<int> s;
TreeNode<int>* root = new TreeNode<int>(11);
root->insert(6);
root->insert(15);
root->insert(4);
root->insert(8);
root->insert(13);
root->insert(19);
root->insert(16);