14 while (t->next != NULL) {
30 if (q->next == NULL) {
45 cout << t->val <<
"\t";
58 reverse(start, start->next);
node * insert(node *root, int item)
inserts a new element into AVL tree
struct node { int data; int height; struct node *left; struct node *right;} node
for std::queue