{"id":507,"date":"2021-07-13T17:29:55","date_gmt":"2021-07-13T17:29:55","guid":{"rendered":"https:\/\/www.wikitechy.com\/interview-questions\/?p=507"},"modified":"2021-09-13T06:25:01","modified_gmt":"2021-09-13T06:25:01","slug":"inorder-tree-traversal-without-recursion-and-without-stack","status":"publish","type":"post","link":"https:\/\/www.wikitechy.com\/interview-questions\/data-structure\/inorder-tree-traversal-without-recursion-and-without-stack\/","title":{"rendered":"Inorder Tree Traversal without recursion and without stack ?"},"content":{"rendered":"<div class=\"TextHeading\">\n<div class=\"hddn\">\n<h2 id=\"inorder-tree-traversal-without-recursion-and-without-stack\" class=\"color-pink\" style=\"text-align: justify;\">Inorder Tree Traversal without recursion and without stack ?<\/h2>\n<\/div>\n<\/div>\n<div class=\"Content\" style=\"text-align: justify;\">\n<div class=\"hddn\">\n<ul>\n<li>To traverse the tree using Morris Traversal is based on\u00a0<a href=\"https:\/\/www.wikitechy.com\/technology\/threaded-binary-tree\/\" target=\"_blank\" rel=\"noopener\">Threaded Binary Tree<\/a>\u00a0which means without using stack and recursion. In this traversal, we first create links to\u00a0<a href=\"https:\/\/www.wikitechy.com\/technology\/python-program-inorder-successor-binary-search-tree\/\" target=\"_blank\" rel=\"noopener\">Inorder successor<\/a>\u00a0and print the data using these links, and finally revert the changes to restore original tree.<\/li>\n<\/ul>\n<\/div>\n<\/div>\n<div class=\"Content\" style=\"text-align: justify;\">\n<div class=\"hddn\">\n<ul>\n<li style=\"list-style-type: none;\">\n<ul>\n<li>If current does not have left child\n<ul>\n<li>Print current\u2019s data<\/li>\n<li>Go to the right, i.e., current = current->right<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/div>\n<\/div>\n<div class=\"Content\" style=\"text-align: justify;\">\n<div class=\"hddn\">\n<ul>\n<li style=\"list-style-type: none;\">\n<ul>\n<li>Else\n<ul>\n<li>Make current as right child of the rightmost<\/li>\n<li>node in current\u2019s left subtree<\/li>\n<li>Go to this left child, i.e., current = current->left<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/div>\n<\/div>\n<div class=\"Content\" style=\"text-align: justify;\">\n<div class=\"hddn\">\n<ul>\n<li>When the tree is modified through the traversal, it is reverted back to its original shape after the completion.<\/li>\n<li>Unlike Stack based traversal, no extra space is required for this traversal.<\/li>\n<\/ul>\n<\/div>\n<\/div>\n<div class=\"read-also\" style=\"text-align: justify;\"><\/div>\n<div class=\"text-center row\" style=\"text-align: justify;\"><\/div>\n<div class=\"TextHeading\">\n<div class=\"hddn\">\n<h2 id=\"sample-code-in-c\" class=\"color-red\" style=\"text-align: justify;\">Sample Code in C++<\/h2>\n<div class=\"code-embed-wrapper\"> <div class=\"code-embed-infos\"> <\/div> <pre class=\"language-cpp code-embed-pre line-numbers\"  data-start=\"1\" data-line-offset=\"0\"><code class=\"language-cpp code-embed-code\">#include <stdio.h> <br\/>#include <stdlib.h> <br\/><br\/>\/* A binary tree tNode has data, pointer to left child <br\/>and a pointer to right child *\/<br\/>struct traversalNode { <br\/>\tint data; <br\/>\tstruct traversalNode* left; <br\/>\tstruct traversalNode* right; <br\/>}; <br\/><br\/>\/* Function to traverse binary tree without recursion and <br\/>without stack *\/<br\/>void MorrisTraversal(struct traversalNode* root) <br\/>{ <br\/>\tstruct traversalNode *current, *pre; <br\/><br\/>\tif (root == NULL) <br\/>\t\treturn; <br\/><br\/>\tcurrent = root; <br\/>\twhile (current != NULL) { <br\/><br\/>\t\tif (current->left == NULL) { <br\/>\t\t\tprintf(&quot;%d &quot;, current->data); <br\/>\t\t\tcurrent = current->right; <br\/>\t\t} <br\/>\t\telse { <br\/><br\/>\t\t\t\/* Find the inorder predecessor of current *\/<br\/>\t\t\tpre = current->left; <br\/>\t\t\twhile (pre->right != NULL && pre->right != current) <br\/>\t\t\t\tpre = pre->right; <br\/><br\/>\t\t\t\/* Make current as right child of its inorder <br\/>\t\t\tpredecessor *\/<br\/>\t\t\tif (pre->right == NULL) { <br\/>\t\t\t\tpre->right = current; <br\/>\t\t\t\tcurrent = current->left; <br\/>\t\t\t} <br\/><br\/>\t\t\t\/* Revert the changes made in if part to restore <br\/>\t\t\tthe original tree i.e., fix the right child <br\/>\t\t\tof predecssor *\/<br\/>\t\t\telse { <br\/>\t\t\t\tpre->right = NULL; <br\/>\t\t\t\tprintf(&quot;%d &quot;, current->data); <br\/>\t\t\t\tcurrent = current->right; <br\/>\t\t\t} \/* End of if condition pre->right == NULL *\/<br\/>\t\t} \/* End of if condition current->left == NULL*\/<br\/>\t} \/* End of while *\/<br\/>} <br\/><br\/>\/* UTILITY FUNCTIONS *\/<br\/>\/* Helper function that allocates a new tNode with the <br\/>given data and NULL left and right pointers. *\/<br\/>struct traversalNode* newtraversalNode(int data) <br\/>{ <br\/>\tstruct traversalNode* node = new traversalNode; <br\/>\tnode->data = data; <br\/>\tnode->left = NULL; <br\/>\tnode->right = NULL; <br\/><br\/>\treturn (node); <br\/>} <br\/><br\/>\/* Driver program to test above functions*\/<br\/>int main() <br\/>{ <br\/><br\/>\t\/* Constructed binary tree is <br\/>\t\t\t12 <br\/>\t\t\/ \\ <br\/>\t\t13\t 14 <br\/>\t\/ \\ <br\/>\t15\t 16 <br\/>*\/<br\/>\tstruct traversalNode* root = newtraversalNode(12); <br\/>\troot->left = newtraversalNode(13); <br\/>\troot->right = newtraversalNode(14); <br\/>\troot->left->left = newtraversalNode(15); <br\/>\troot->left->right = newtraversalNode(16); <br\/><br\/>\tMorrisTraversal(root); <br\/><br\/>\treturn 0; <br\/>} <\/code><\/pre> <\/div>\n<div class=\"TextHeading\" style=\"text-align: justify;\">\n<div class=\"hddn\">\n<h2 id=\"output\" class=\"color-red\">Output<\/h2>\n<\/div>\n<\/div>\n<div class=\"Output\" style=\"text-align: justify;\">\n<div class=\"hddn\">\n<figure class=\"highlight\">\n<pre><code class=\"hljs\" data-lang=\"\"><span class=\"nt\">15 13 16 12 14 \r\n<\/span><\/code><\/pre>\n<\/figure>\n<\/div>\n<\/div>\n<div class=\"Content\">\n<div class=\"hddn\">\n<ul>\n<li style=\"text-align: justify;\">Time Complexity : O(n) If we investigate, we can see that each edge of the tree is crossed at-most multiple times.<\/li>\n<li style=\"text-align: justify;\">Also, in most pessimistic scenario same number of additional edges (as info tree) are made and evacuated.<\/li>\n<\/ul>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>Answer : To traverse the tree using Morris Traversal&#8230;<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3028],"tags":[195,971,491,221,3594,3598,3588,368,3596,3577,203,199,214,198,363,3057,3591,205,222,484,3054,196,212,3595,3592,3575,3586,3589,3593,3582,3590,3583,3581,3573,3580,3585,3579,3587,3578,207,366,204,3584,3574,3576,206,972,200,3055,197,3597,968,3056,285,969],"class_list":["post-507","post","type-post","status-publish","format-standard","hentry","category-data-structure","tag-accenture-interview-questions-and-answers","tag-altimetrik-india-pvt-ltd-interview-questions-and-answers","tag-applied-materials-interview-questions-and-answers","tag-bharti-airtel-interview-questions-and-answers","tag-binary-search-tree-inorder-traversal","tag-binary-search-tree-traversal-inorder-preorder-postorder-example","tag-binary-tree-inorder-traversal","tag-bmc-software-interview-questions-and-answers","tag-bst-inorder-traversal","tag-c-tree-traversal-without-recursion","tag-capgemini-interview-questions-and-answers","tag-casting-networks-india-pvt-limited-interview-questions-and-answers","tag-cgi-group-inc-interview-questions-and-answers","tag-chetu-interview-questions-and-answers","tag-ciena-corporation-interview-questions-and-answers","tag-collabera-te-interview-questions-and-answers","tag-construct-binary-tree-from-preorder-and-inorder-traversal","tag-dell-international-services-india-pvt-ltd-interview-questions-and-answers","tag-flipkart-interview-questions-and-answers","tag-genpact-interview-questions-and-answers","tag-globallogic-india-pvt-ltd-interview-questions-and-answers","tag-ibm-interview-questions-and-answers","tag-indecomm-global-services-interview-questions-and-answers","tag-inorder-preorder-postorder-traversal","tag-inorder-preorder-postorder-traversal-examples-pdf","tag-inorder-preorder-postorder-traversal-without-recursion-in-c","tag-inorder-traversal","tag-inorder-traversal-algorithm","tag-inorder-traversal-example","tag-inorder-traversal-iterative-python","tag-inorder-traversal-java","tag-inorder-traversal-python","tag-inorder-traversal-with-recursion","tag-inorder-traversal-without-recursion","tag-inorder-traversal-without-recursion-and-stack","tag-inorder-traversal-without-recursion-in-c","tag-inorder-traversal-without-recursion-using-stack-in-c","tag-inorder-tree-traversal","tag-inorder-tree-traversal-without-recursion","tag-mphasis-interview-questions-and-answers","tag-netapp-interview-questions-and-answers","tag-oracle-corporation-interview-questions-and-answers","tag-postorder-traversal-algorithm-using-stack","tag-postorder-traversal-without-recursion","tag-preorder-traversal-without-recursion","tag-sap-labs-india-pvt-ltd-interview-questions-and-answers","tag-sapient-consulting-pvt-ltd-interview-questions-and-answers","tag-tech-mahindra-interview-questions-and-answers","tag-tracxn-technologies-pvt-ltd-interview-questions-and-answers","tag-unitedhealth-group-interview-questions-and-answers","tag-what-is-inorder-traversal","tag-wipro-infotech-interview-questions-and-answers","tag-wm-global-technology-services-india-pvt-ltd-limited-wmgts-interview-questions-and-answers","tag-xoriant-solutions-pvt-ltd-interview-questions-and-answers","tag-yodlee-infotech-pvt-ltd-interview-questions-and-answers"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.6 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Inorder Tree Traversal without recursion and without stack ?<\/title>\n<meta name=\"description\" content=\"Inorder Tree Traversal without recursion and without stack ? - To traverse the tree using Morris Traversal is based on Threaded Binary Tree which means without using stack and recursion.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.wikitechy.com\/interview-questions\/data-structure\/inorder-tree-traversal-without-recursion-and-without-stack\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Inorder Tree Traversal without recursion and without stack ?\" \/>\n<meta property=\"og:description\" content=\"Inorder Tree Traversal without recursion and without stack ? - To traverse the tree using Morris Traversal is based on Threaded Binary Tree which means without using stack and recursion.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.wikitechy.com\/interview-questions\/data-structure\/inorder-tree-traversal-without-recursion-and-without-stack\/\" \/>\n<meta property=\"og:site_name\" content=\"Wikitechy\" \/>\n<meta property=\"article:published_time\" content=\"2021-07-13T17:29:55+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2021-09-13T06:25:01+00:00\" \/>\n<meta name=\"author\" content=\"Editor\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Editor\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.wikitechy.com\\\/interview-questions\\\/data-structure\\\/inorder-tree-traversal-without-recursion-and-without-stack\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.wikitechy.com\\\/interview-questions\\\/data-structure\\\/inorder-tree-traversal-without-recursion-and-without-stack\\\/\"},\"author\":{\"name\":\"Editor\",\"@id\":\"https:\\\/\\\/www.wikitechy.com\\\/interview-questions\\\/#\\\/schema\\\/person\\\/4d5a581fb5470d1560324bddc5e8b757\"},\"headline\":\"Inorder Tree Traversal without recursion and without stack ?\",\"datePublished\":\"2021-07-13T17:29:55+00:00\",\"dateModified\":\"2021-09-13T06:25:01+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.wikitechy.com\\\/interview-questions\\\/data-structure\\\/inorder-tree-traversal-without-recursion-and-without-stack\\\/\"},\"wordCount\":612,\"commentCount\":0,\"keywords\":[\"Accenture interview questions and answers\",\"Altimetrik India Pvt Ltd interview questions and answers\",\"Applied Materials interview questions and answers\",\"Bharti Airtel interview questions and answers\",\"binary search tree inorder traversal\",\"binary search tree traversal inorder preorder postorder example\",\"binary tree inorder traversal\",\"BMC Software interview questions and answers\",\"bst inorder traversal\",\"c# tree traversal without recursion\",\"Capgemini interview questions and answers\",\"CASTING NETWORKS INDIA PVT LIMITED interview questions and answers\",\"CGI Group Inc interview questions and answers\",\"Chetu interview questions and answers\",\"Ciena Corporation interview questions and answers\",\"Collabera Te interview questions and answers\",\"construct binary tree from preorder and inorder traversal\",\"Dell International Services India Pvt Ltd interview questions and answers\",\"Flipkart interview questions and answers\",\"Genpact interview questions and answers\",\"Globallogic India Pvt Ltd interview questions and answers\",\"IBM interview questions and answers\",\"Indecomm Global Services interview questions and answers\",\"inorder preorder postorder traversal\",\"inorder preorder postorder traversal examples pdf\",\"inorder preorder postorder traversal without recursion in c\",\"inorder traversal\",\"inorder traversal algorithm\",\"inorder traversal example\",\"inorder traversal iterative python\",\"inorder traversal java\",\"inorder traversal python\",\"inorder traversal with recursion\",\"inorder traversal without recursion\",\"inorder traversal without recursion and stack\",\"inorder traversal without recursion in c\",\"inorder traversal without recursion using stack in c\",\"inorder tree traversal\",\"inorder tree traversal without recursion\",\"Mphasis interview questions and answers\",\"NetApp interview questions and answers\",\"Oracle Corporation interview questions and answers\",\"postorder traversal algorithm using stack\",\"postorder traversal without recursion\",\"preorder traversal without recursion\",\"SAP Labs India Pvt Ltd interview questions and answers\",\"Sapient Consulting Pvt Ltd interview questions and answers\",\"Tech Mahindra interview questions and answers\",\"Tracxn Technologies Pvt Ltd interview questions and answers\",\"UnitedHealth Group interview questions and answers\",\"what is inorder traversal\",\"Wipro Infotech interview questions and answers\",\"WM Global Technology Services India Pvt.Ltd Limited (WMGTS) interview questions and answers\",\"Xoriant Solutions Pvt Ltd interview questions and answers\",\"Yodlee Infotech Pvt Ltd interview questions and answers\"],\"articleSection\":[\"Data Structure\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.wikitechy.com\\\/interview-questions\\\/data-structure\\\/inorder-tree-traversal-without-recursion-and-without-stack\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.wikitechy.com\\\/interview-questions\\\/data-structure\\\/inorder-tree-traversal-without-recursion-and-without-stack\\\/\",\"url\":\"https:\\\/\\\/www.wikitechy.com\\\/interview-questions\\\/data-structure\\\/inorder-tree-traversal-without-recursion-and-without-stack\\\/\",\"name\":\"Inorder Tree Traversal without recursion and without stack ?\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.wikitechy.com\\\/interview-questions\\\/#website\"},\"datePublished\":\"2021-07-13T17:29:55+00:00\",\"dateModified\":\"2021-09-13T06:25:01+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/www.wikitechy.com\\\/interview-questions\\\/#\\\/schema\\\/person\\\/4d5a581fb5470d1560324bddc5e8b757\"},\"description\":\"Inorder Tree Traversal without recursion and without stack ? - To traverse the tree using Morris Traversal is based on Threaded Binary Tree which means without using stack and recursion.\",\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.wikitechy.com\\\/interview-questions\\\/data-structure\\\/inorder-tree-traversal-without-recursion-and-without-stack\\\/\"]}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.wikitechy.com\\\/interview-questions\\\/#website\",\"url\":\"https:\\\/\\\/www.wikitechy.com\\\/interview-questions\\\/\",\"name\":\"Wikitechy\",\"description\":\"Interview Questions\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.wikitechy.com\\\/interview-questions\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.wikitechy.com\\\/interview-questions\\\/#\\\/schema\\\/person\\\/4d5a581fb5470d1560324bddc5e8b757\",\"name\":\"Editor\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/e9531079fe7e07841b7b156c04d65e5f39d4adfd18b6ffe3edfff8ca5aab85b5?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/e9531079fe7e07841b7b156c04d65e5f39d4adfd18b6ffe3edfff8ca5aab85b5?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/e9531079fe7e07841b7b156c04d65e5f39d4adfd18b6ffe3edfff8ca5aab85b5?s=96&d=mm&r=g\",\"caption\":\"Editor\"},\"url\":\"https:\\\/\\\/www.wikitechy.com\\\/interview-questions\\\/author\\\/editor\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Inorder Tree Traversal without recursion and without stack ?","description":"Inorder Tree Traversal without recursion and without stack ? - To traverse the tree using Morris Traversal is based on Threaded Binary Tree which means without using stack and recursion.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.wikitechy.com\/interview-questions\/data-structure\/inorder-tree-traversal-without-recursion-and-without-stack\/","og_locale":"en_US","og_type":"article","og_title":"Inorder Tree Traversal without recursion and without stack ?","og_description":"Inorder Tree Traversal without recursion and without stack ? - To traverse the tree using Morris Traversal is based on Threaded Binary Tree which means without using stack and recursion.","og_url":"https:\/\/www.wikitechy.com\/interview-questions\/data-structure\/inorder-tree-traversal-without-recursion-and-without-stack\/","og_site_name":"Wikitechy","article_published_time":"2021-07-13T17:29:55+00:00","article_modified_time":"2021-09-13T06:25:01+00:00","author":"Editor","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Editor","Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.wikitechy.com\/interview-questions\/data-structure\/inorder-tree-traversal-without-recursion-and-without-stack\/#article","isPartOf":{"@id":"https:\/\/www.wikitechy.com\/interview-questions\/data-structure\/inorder-tree-traversal-without-recursion-and-without-stack\/"},"author":{"name":"Editor","@id":"https:\/\/www.wikitechy.com\/interview-questions\/#\/schema\/person\/4d5a581fb5470d1560324bddc5e8b757"},"headline":"Inorder Tree Traversal without recursion and without stack ?","datePublished":"2021-07-13T17:29:55+00:00","dateModified":"2021-09-13T06:25:01+00:00","mainEntityOfPage":{"@id":"https:\/\/www.wikitechy.com\/interview-questions\/data-structure\/inorder-tree-traversal-without-recursion-and-without-stack\/"},"wordCount":612,"commentCount":0,"keywords":["Accenture interview questions and answers","Altimetrik India Pvt Ltd interview questions and answers","Applied Materials interview questions and answers","Bharti Airtel interview questions and answers","binary search tree inorder traversal","binary search tree traversal inorder preorder postorder example","binary tree inorder traversal","BMC Software interview questions and answers","bst inorder traversal","c# tree traversal without recursion","Capgemini interview questions and answers","CASTING NETWORKS INDIA PVT LIMITED interview questions and answers","CGI Group Inc interview questions and answers","Chetu interview questions and answers","Ciena Corporation interview questions and answers","Collabera Te interview questions and answers","construct binary tree from preorder and inorder traversal","Dell International Services India Pvt Ltd interview questions and answers","Flipkart interview questions and answers","Genpact interview questions and answers","Globallogic India Pvt Ltd interview questions and answers","IBM interview questions and answers","Indecomm Global Services interview questions and answers","inorder preorder postorder traversal","inorder preorder postorder traversal examples pdf","inorder preorder postorder traversal without recursion in c","inorder traversal","inorder traversal algorithm","inorder traversal example","inorder traversal iterative python","inorder traversal java","inorder traversal python","inorder traversal with recursion","inorder traversal without recursion","inorder traversal without recursion and stack","inorder traversal without recursion in c","inorder traversal without recursion using stack in c","inorder tree traversal","inorder tree traversal without recursion","Mphasis interview questions and answers","NetApp interview questions and answers","Oracle Corporation interview questions and answers","postorder traversal algorithm using stack","postorder traversal without recursion","preorder traversal without recursion","SAP Labs India Pvt Ltd interview questions and answers","Sapient Consulting Pvt Ltd interview questions and answers","Tech Mahindra interview questions and answers","Tracxn Technologies Pvt Ltd interview questions and answers","UnitedHealth Group interview questions and answers","what is inorder traversal","Wipro Infotech interview questions and answers","WM Global Technology Services India Pvt.Ltd Limited (WMGTS) interview questions and answers","Xoriant Solutions Pvt Ltd interview questions and answers","Yodlee Infotech Pvt Ltd interview questions and answers"],"articleSection":["Data Structure"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.wikitechy.com\/interview-questions\/data-structure\/inorder-tree-traversal-without-recursion-and-without-stack\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.wikitechy.com\/interview-questions\/data-structure\/inorder-tree-traversal-without-recursion-and-without-stack\/","url":"https:\/\/www.wikitechy.com\/interview-questions\/data-structure\/inorder-tree-traversal-without-recursion-and-without-stack\/","name":"Inorder Tree Traversal without recursion and without stack ?","isPartOf":{"@id":"https:\/\/www.wikitechy.com\/interview-questions\/#website"},"datePublished":"2021-07-13T17:29:55+00:00","dateModified":"2021-09-13T06:25:01+00:00","author":{"@id":"https:\/\/www.wikitechy.com\/interview-questions\/#\/schema\/person\/4d5a581fb5470d1560324bddc5e8b757"},"description":"Inorder Tree Traversal without recursion and without stack ? - To traverse the tree using Morris Traversal is based on Threaded Binary Tree which means without using stack and recursion.","inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wikitechy.com\/interview-questions\/data-structure\/inorder-tree-traversal-without-recursion-and-without-stack\/"]}]},{"@type":"WebSite","@id":"https:\/\/www.wikitechy.com\/interview-questions\/#website","url":"https:\/\/www.wikitechy.com\/interview-questions\/","name":"Wikitechy","description":"Interview Questions","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.wikitechy.com\/interview-questions\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/www.wikitechy.com\/interview-questions\/#\/schema\/person\/4d5a581fb5470d1560324bddc5e8b757","name":"Editor","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/e9531079fe7e07841b7b156c04d65e5f39d4adfd18b6ffe3edfff8ca5aab85b5?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/e9531079fe7e07841b7b156c04d65e5f39d4adfd18b6ffe3edfff8ca5aab85b5?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/e9531079fe7e07841b7b156c04d65e5f39d4adfd18b6ffe3edfff8ca5aab85b5?s=96&d=mm&r=g","caption":"Editor"},"url":"https:\/\/www.wikitechy.com\/interview-questions\/author\/editor\/"}]}},"_links":{"self":[{"href":"https:\/\/www.wikitechy.com\/interview-questions\/wp-json\/wp\/v2\/posts\/507","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.wikitechy.com\/interview-questions\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.wikitechy.com\/interview-questions\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.wikitechy.com\/interview-questions\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.wikitechy.com\/interview-questions\/wp-json\/wp\/v2\/comments?post=507"}],"version-history":[{"count":3,"href":"https:\/\/www.wikitechy.com\/interview-questions\/wp-json\/wp\/v2\/posts\/507\/revisions"}],"predecessor-version":[{"id":3493,"href":"https:\/\/www.wikitechy.com\/interview-questions\/wp-json\/wp\/v2\/posts\/507\/revisions\/3493"}],"wp:attachment":[{"href":"https:\/\/www.wikitechy.com\/interview-questions\/wp-json\/wp\/v2\/media?parent=507"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wikitechy.com\/interview-questions\/wp-json\/wp\/v2\/categories?post=507"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wikitechy.com\/interview-questions\/wp-json\/wp\/v2\/tags?post=507"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}