q.push(
node->right);
52voidmorrisInorder(
Btree*root) {
56 if(curr->left == NULL) {
57cout << curr->data <<
" ";
64 while(temp->right && temp->right != curr) temp = temp->right;
67 if(temp->right == NULL) {
74 else if(temp->right == curr) {
75cout << curr->data <<
" ";
84voiddeleteAll(
const Btree*
constroot) {
86deleteAll(root->left);
87deleteAll(root->right);
96 for(i = 1; i <= 7; i++)
insert(&root, i);
97cout <<
"Morris Inorder: ";
node * insert(node *root, int item)
inserts a new element into AVL tree
int main()
Main function.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4