

{"id":59110,"date":"2019-06-14T14:16:08","date_gmt":"2019-06-14T08:46:08","guid":{"rendered":"https:\/\/data-flair.training\/blogs\/?p=59110"},"modified":"2021-07-23T13:25:14","modified_gmt":"2021-07-23T07:55:14","slug":"binary-tree-in-c","status":"publish","type":"post","link":"https:\/\/data-flair.training\/blogs\/binary-tree-in-c\/","title":{"rendered":"Binary Tree in C &#8211; Explore the Reason behind its Popularity"},"content":{"rendered":"<div class='__iawmlf-post-loop-links' style='display:none;' data-iawmlf-post-links='[{&quot;id&quot;:1483,&quot;href&quot;:&quot;https:\\\/\\\/en.wikipedia.org\\\/wiki\\\/C_(programming_language)&quot;,&quot;archived_href&quot;:&quot;http:\\\/\\\/web-wp.archive.org\\\/web\\\/20251205115343\\\/https:\\\/\\\/en.wikipedia.org\\\/wiki\\\/C_(programming_language)&quot;,&quot;redirect_href&quot;:&quot;&quot;,&quot;checks&quot;:[{&quot;date&quot;:&quot;2025-12-09 08:48:42&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2025-12-12 09:01:03&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2025-12-15 12:27:27&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2025-12-18 15:58:44&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2025-12-22 04:52:39&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2025-12-25 07:47:58&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2025-12-28 07:49:34&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2025-12-31 10:04:18&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-01-03 13:16:43&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-01-06 16:33:59&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-01-09 23:54:15&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-01-13 00:12:02&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-01-16 01:20:51&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-01-19 06:06:53&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-01-22 08:41:46&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-01-25 09:05:11&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-01-28 10:37:00&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-01-31 14:56:39&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-02-03 20:18:29&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-02-07 03:00:19&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-02-10 05:16:45&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-02-13 09:34:33&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-02-17 04:05:39&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-02-20 05:05:34&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-02-23 08:37:49&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-02-26 11:07:05&quot;,&quot;http_code&quot;:404},{&quot;date&quot;:&quot;2026-03-01 15:45:23&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-03-05 05:56:05&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-03-08 10:59:07&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-03-11 11:01:49&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-03-14 11:45:46&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-03-17 15:31:09&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-03-20 16:41:07&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-03-23 18:46:11&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-03-27 02:31:24&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-03-30 05:51:05&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-04-02 13:02:50&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-04-06 04:44:34&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-04-09 06:24:20&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-04-12 07:15:52&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-04-15 07:33:00&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-04-18 07:48:49&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-04-21 11:15:50&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-04-25 02:39:47&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-04-28 03:27:40&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-05-01 14:16:09&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-05-04 16:27:01&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-05-07 20:44:30&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-05-11 12:34:03&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-05-14 16:12:28&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-05-17 18:26:13&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-05-20 18:34:35&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-05-24 14:09:17&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-05-27 18:14:38&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-05-31 08:27:44&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-06-03 08:40:08&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-06-06 13:07:55&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-06-09 14:05:01&quot;,&quot;http_code&quot;:404}],&quot;broken&quot;:false,&quot;last_checked&quot;:{&quot;date&quot;:&quot;2026-06-09 14:05:01&quot;,&quot;http_code&quot;:404},&quot;process&quot;:&quot;done&quot;}]'><\/div>\n<p><em>Binary Tree in C is a non-linear data structure in which the node is linked to two successor nodes, namely root, left and right.<\/em> Binary trees are a very popular concept in the C programming language. But, before we begin this tutorial, it is important to have a crystal clear understanding of pointers and linked lists in C.<\/p>\n<p>In this tutorial, we will discuss:<\/p>\n<ul>\n<li>Tree in C<\/li>\n<li>The requirement of a binary tree<\/li>\n<li>Types of binary tree<\/li>\n<li>Implementation of a binary tree<\/li>\n<\/ul>\n<h2>1. What are Trees in C?<\/h2>\n<p>In mathematical terminology, a tree is referred to as a finite and non-empty set of elements. It can also be regarded as an abstract model of a hierarchical structure that follows a parent-child relationship.<\/p>\n<p>In programming terminology, a tree is nothing but a non-linear data structure that has multiple nodes, rather than just one like we saw in a <strong>linked list, stack, and queue<\/strong>.<\/p>\n<p>When we talk about trees in C, we generally refer to a binary tree.\u00a0We will discuss in detail the meaning of a binary tree in the later section.<\/p>\n<p><strong>Here is a diagrammatic representation of a tree:<\/strong><\/p>\n<p><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/06\/Representation-of-a-tree.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-59236\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/06\/Representation-of-a-tree.jpg\" alt=\"Representation of a tree\" width=\"450\" height=\"300\" srcset=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/06\/Representation-of-a-tree.jpg 450w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/06\/Representation-of-a-tree-150x100.jpg 150w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/06\/Representation-of-a-tree-300x200.jpg 300w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/06\/Representation-of-a-tree-272x182.jpg 272w\" sizes=\"auto, (max-width: 450px) 100vw, 450px\" \/><\/a><\/p>\n<p><em><strong>Explore 15 types of <a href=\"https:\/\/data-flair.training\/blogs\/escape-sequence-in-c\/\">Escape Sequence in C<\/a> that makes your coding better<\/strong><\/em><\/p>\n<p>Before we proceed towards the discussion on a binary tree, let us acquaint ourselves with some of the tree terminologies:<\/p>\n<ol>\n<li><strong>Root:<\/strong> A node without a parent is called a root. In the above diagram, \u201c1\u201d is the root.<\/li>\n<li><strong>Siblings:<\/strong> The nodes that have the same parent are called siblings. In the above diagram \u201c2\u201d, \u201c3\u201d and \u201c4\u201d are siblings as they have a common parent \u201c1\u201d.<\/li>\n<li><strong>Internal node:<\/strong> A node that has at least a single child is called an internal node. In the above diagram, \u201c1\u201d, \u201c2\u201d, 3\u201c and \u201c6\u201d are internal nodes.<\/li>\n<li><strong>External node:<\/strong> It is also called a leaf. In simple words, a node without any children is called an external node. In the above diagram, \u201c4\u201d, \u201c5\u201d, \u201c7\u201d, \u201c8, \u201c9\u201d, \u201c10\u201d and &#8220;11&#8221; are external nodes.<\/li>\n<li><strong>Ancestors:<\/strong> These include the parent, grandparents or great grandparents and so on of a node. In the above diagram, the ancestors of \u201c6\u201d are \u201c1\u201d and \u201c3\u201d.<\/li>\n<li><strong>Descendants:<\/strong> These include the child, grandchild or great-grandchild and so on of a node. In the above diagram, the descendants of \u201c2\u201d are \u201c5\u201d, \u201c6\u201d, \u201c9\u201d, \u201c10\u201d and \u201c1\u201d.<\/li>\n<li><strong>Edge:<\/strong> Connection between one node to another is called an edge. In the above diagram, the purple line from \u201c1\u201d to \u201c4\u201d is an edge.<\/li>\n<li><strong>Path:<\/strong> It is a sequence of nodes and edges that are connected with each other. In the above diagram, the red line from \u201c1\u201d to \u201c10\u201d is a path. It is important to note that a path simply does not only contain edges but nodes also.<\/li>\n<li><strong>Depth:<\/strong> It refers to the number of edges from the node to the root of the tree\u2019s node.<\/li>\n<li><strong>Height:<\/strong> It refers to the maximum depth of a node.<\/li>\n<li><strong>Level:<\/strong> The level of a node is (the depth of the node + 1).<\/li>\n<\/ol>\n<p><strong>Key takeaway:<\/strong> <em>The height and depth of a tree are equal, but the height and depth of a node will always be different.<\/em><\/p>\n<h2>2. Binary Tree in C Programming<\/h2>\n<p><em>This tree consists of zero or more nodes. It is important to note that a binary tree can have no children (leaf node), 1 child or 2 children. No other cases are possible.<\/em><\/p>\n<p><strong>Diagrammatic representation of how a binary tree looks like:<\/strong><\/p>\n<p><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/06\/Binary-tree-in-C.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-59194\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/06\/Binary-tree-in-C.jpg\" alt=\" Binary tree in C Programming Language\" width=\"802\" height=\"420\" srcset=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/06\/Binary-tree-in-C.jpg 802w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/06\/Binary-tree-in-C-150x79.jpg 150w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/06\/Binary-tree-in-C-300x157.jpg 300w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/06\/Binary-tree-in-C-768x402.jpg 768w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/06\/Binary-tree-in-C-520x272.jpg 520w\" sizes=\"auto, (max-width: 802px) 100vw, 802px\" \/><\/a><\/p>\n<p><strong>Here is a diagrammatic representation of how data is stored in the node of a binary tree:<\/strong><\/p>\n<p><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/06\/node-of-a-binary-tree-in-C.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-60020\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/06\/node-of-a-binary-tree-in-C.jpg\" alt=\"node of a binary tree in C\" width=\"300\" height=\"150\" srcset=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/06\/node-of-a-binary-tree-in-C.jpg 300w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/06\/node-of-a-binary-tree-in-C-150x75.jpg 150w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p>Here, *left_pointer is the pointer to a left child which may or may not be NULL and *right_pointer is the pointer to a right child which may or may not be NULL.<\/p>\n<p><em><strong>Uncover the Difference between <a href=\"https:\/\/data-flair.training\/blogs\/typecasting-in-c\/\">Typecasting &amp; Type Conversion in C<\/a><\/strong><\/em><\/p>\n<h2>3. Need for Binary Tree in C<\/h2>\n<p>This tree proves to be of great importance, which we will discuss in detail one by one.<\/p>\n<p>There are several applications of a binary tree when it comes to C programming. Some of them are:<\/p>\n<ol>\n<li>The implementation of BST (Binary Search Tree) is a fast and efficient method to find an element in a huge set.<\/li>\n<li>This tree gives birth to the concept of heaps through which heapsort can be implemented.<\/li>\n<li>In order to implement databases, a binary tree is of utmost importance as they are the base of B-Trees and T-Trees to store information.<\/li>\n<\/ol>\n<h2>4. Types of Binary Tree in C<\/h2>\n<p>There are basically two types of a C binary tree. They are namely:<\/p>\n<h4>4.1 Complete binary tree<\/h4>\n<p>A tree in which every level except the last level is filled completely and all nodes are as far left as possible is called a complete binary tree.<\/p>\n<p><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/06\/Complete-Binary-tree-in-C.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-59195\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/06\/Complete-Binary-tree-in-C.jpg\" alt=\"Complete Binary tree in C\" width=\"300\" height=\"200\" srcset=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/06\/Complete-Binary-tree-in-C.jpg 300w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/06\/Complete-Binary-tree-in-C-150x100.jpg 150w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/06\/Complete-Binary-tree-in-C-272x182.jpg 272w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<h4>4.2 Full binary tree<\/h4>\n<p>A tree in which every node has two children except the external node (leaves) is called a full binary tree.<\/p>\n<p><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/06\/Full-binary-Tree-in-C.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-59196\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/06\/Full-binary-Tree-in-C.jpg\" alt=\"Full binary Tree in C\" width=\"200\" height=\"150\" srcset=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/06\/Full-binary-Tree-in-C.jpg 200w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/06\/Full-binary-Tree-in-C-150x113.jpg 150w\" sizes=\"auto, (max-width: 200px) 100vw, 200px\" \/><\/a><\/p>\n<h2>5. Implementation of Binary Tree in C<\/h2>\n<p>In the <a href=\"https:\/\/en.wikipedia.org\/wiki\/C_(programming_language)\">C <\/a>programming language, we can implement a binary tree in a similar fashion like linked lists. We employ the use of<strong> structures in C<\/strong>.<\/p>\n<h4>5.1 Declaration<\/h4>\n<p>Before we learn how to implement a binary tree, let us see how to declare it.<\/p>\n<pre class=\"EnlighterJSRAW\">struct node\r\n{\r\nint data;\r\nstruct node *left;\r\nstruct node *right;\r\n};\r\n\r\n<\/pre>\n<h4>5.2 Creating Nodes<\/h4>\n<p>This is how a linked list of three data elements is created in C:<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">struct node *root;\r\nstruct node *one = NULL;\r\nstruct node *two = NULL;\r\nstruct node *three = NULL;\r\n\r\n\/* Dynamic memory allocation *\/\r\none = malloc(sizeof(struct node));\r\ntwo = malloc(sizeof(struct node));\r\nthree = malloc(sizeof(struct node));\r\n\r\n\/* Assign data values *\/\r\none-&gt;data_element = 1;\r\ntwo-&gt;data_element = 2;\r\nthree-&gt;data_element = 3;\r\n\r\n\/* Connecting nodes *\/\r\none-&gt;left = two;\r\none-&gt;right = three;\r\ntwo-&gt;left = NULL;\r\ntwo-&gt;right = NULL;\r\nthree-&gt;left = NULL;\r\nthree-&gt;right = NULL;\r\n\r\n\/* Saving the address of the first node in the root *\/\r\nroot = one;<\/pre>\n<p><em><strong>Before we discuss the implementation process, you should be aware of the\u00a0<a href=\"https:\/\/data-flair.training\/blogs\/functions-in-c\/\">Functions in C<\/a>.<\/strong><\/em><\/p>\n<h4>5.3 Implementation of Binary Tree in C<\/h4>\n<p><span style=\"font-size: 1rem;\">Here is a program in C that illustrates the implementation of a binary tree:<\/span><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">#include&lt;stdio.h&gt;\r\n#include&lt;stdlib.h&gt;\r\nstruct node\r\n{\r\nint data_element;\r\nstruct node *left, *right;\r\n};\r\n\r\nstruct node *new_node(int data_element)\r\n{\r\nstruct node *temp = (struct node *)malloc(sizeof(struct node)); \/\/ Allocating memory to the node\r\ntemp-&gt;data_element = data_element;\r\ntemp-&gt;left = temp-&gt;right = NULL;\r\nreturn temp;\r\n}\r\n\r\nvoid display(struct node *root) \/\/ A function for the inroder traversal of the binary tree\r\n{\r\nif (root != NULL)\r\n{\r\ndisplay(root-&gt;left);\r\nprintf(\"%d \\n\", root-&gt;data_element);\r\ndisplay(root-&gt;right);\r\n}\r\n}\r\n\r\nstruct node* insert(struct node* node, int data_element) \/\/ Function to insert a new node\r\n{\r\n\r\nif (node == NULL) return new_node(data_element); \/\/ Return a new node if the tree if empty\r\nif (data_element &lt; node-&gt;data_element)\r\n{\r\nnode-&gt;left = insert(node-&gt;left, data_element);\r\n}\r\nelse if (data_element &gt; node-&gt;data_element)\r\n{\r\nnode-&gt;right = insert(node-&gt;right, data_element);\r\n}\r\nreturn node;\r\n}\r\n\r\nint main()\r\n{\r\n\r\nprintf(\"Welcome to DataFlair tutorials!\\n\\n\");\r\n\r\nstruct node *root = NULL;\r\nroot = insert(root, 10);\r\ninsert(root, 20);\r\ninsert(root, 30);\r\ninsert(root, 40);\r\ninsert(root, 50);\r\ninsert(root, 60);\r\ninsert(root, 70);\r\n\r\ndisplay(root); \/\/ Function to display the binary tree elements\r\n\r\nreturn 0;\r\n}<\/pre>\n<p><strong>Output-<\/strong><\/p>\n<p><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/06\/Output-of-implementation-of-a-binary-tree-in-C.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-59206\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/06\/Output-of-implementation-of-a-binary-tree-in-C.jpg\" alt=\"Output of implementation of a binary tree in C\" width=\"1297\" height=\"649\" srcset=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/06\/Output-of-implementation-of-a-binary-tree-in-C.jpg 1297w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/06\/Output-of-implementation-of-a-binary-tree-in-C-150x75.jpg 150w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/06\/Output-of-implementation-of-a-binary-tree-in-C-300x150.jpg 300w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/06\/Output-of-implementation-of-a-binary-tree-in-C-768x384.jpg 768w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/06\/Output-of-implementation-of-a-binary-tree-in-C-1024x512.jpg 1024w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/06\/Output-of-implementation-of-a-binary-tree-in-C-520x260.jpg 520w\" sizes=\"auto, (max-width: 1297px) 100vw, 1297px\" \/><\/a><\/p>\n<h2>6. Quiz on Binary Tree in C<\/h2>\n<p><strong><div class=\"learndash user_has_no_access\"  id=\"learndash_post_99179\"><div class=\"learndash-wrapper\">\n\n<div class=\"ld-tabs ld-tab-count-1\">\n\t\n\t<div class=\"ld-tabs-content\">\n\t\t\n\t\t\t<div role=\"tabpanel\" tabindex=\"0\" aria-labelledby=\"content\" class=\"ld-tab-content ld-visible\" id=\"ld-tab-content-59110\">\n\t\t\t\t\t\t\t\t\t\t\t<\/div>\n\n\t\t\t\n\t<\/div> <!--\/.ld-tabs-content-->\n\n<\/div> <!--\/.ld-tabs-->\n\t\t<div class=\"wpProQuiz_content\" id=\"wpProQuiz_349\" data-quiz-meta=\"{&quot;quiz_pro_id&quot;:349,&quot;quiz_post_id&quot;:99179}\">\n\t\t\t<div class=\"wpProQuiz_spinner\" style=\"display:none\">\n\t\t\t\t<div><\/div>\n\t\t\t<\/div>\n\t\t\t<div style=\"display: none;\" class=\"wpProQuiz_time_limit\">\n\t<div class=\"time\">\n\t\tTime limit: <span>0<\/span>\t<\/div>\n\t<div class=\"wpProQuiz_progress\"><\/div>\n<\/div>\n<div class=\"wpProQuiz_checkPage\" style=\"display: none;\">\n\t<h4 class=\"wpProQuiz_header\">\n\tQuiz Summary\t<\/h4>\n\t<p><span>0<\/span> of 15 Questions completed<\/p>\t<p>Questions:<\/p>\n\t<div class=\"wpProQuiz_reviewSummary\"><\/div>\n\n\t\n\t<input type=\"button\" name=\"endQuizSummary\" value=\"Finish Quiz\" class=\"wpProQuiz_button\" \/> <\/div>\n<div class=\"wpProQuiz_infopage\" style=\"display: none;\">\n\t<h4>Information<\/h4>\n\t\t<input type=\"button\" name=\"endInfopage\" value=\"Finish Quiz\" class=\"wpProQuiz_button\" \/> <\/div>\n<div class=\"wpProQuiz_text\">\n\t\t<div>\n\t\t<input class=\"wpProQuiz_button\" type=\"button\" \n\t\tvalue=\"Start Quiz\" name=\"startQuiz\" \/>\t<\/div>\n<\/div>\n<div style=\"display: none;\" class=\"wpProQuiz_lock\">\t\t\n\t<p>You have already completed the quiz before. Hence you can not start it again.<\/p><\/div>\n<div style=\"display: none;\" class=\"wpProQuiz_loadQuiz\">\n\t<p>\n\t\tQuiz is loading&#8230;\t<\/p>\n<\/div>\n<div style=\"display: none;\" class=\"wpProQuiz_startOnlyRegisteredUser\">\n\t<p>You must sign in or sign up to start the quiz.<\/p><\/div>\n<div style=\"display: none;\" class=\"wpProQuiz_prerequisite\">\n\t<p>You must first complete the following: <span><\/span><\/p><\/div>\n<div style=\"display: none;\" class=\"wpProQuiz_sending\">\n\t<h4 class=\"wpProQuiz_header\">Results<\/h4>\n\t<p>\n\t\t<div>\n\t\tQuiz complete. Results are being recorded.\t\t<\/div>\n\t\t<div>\n\t\t\t<dd class=\"course_progress\">\n\t\t\t\t<div class=\"course_progress_blue sending_progress_bar\" style=\"width: 0%;\">\n\t\t\t\t<\/div>\n\t\t\t<\/dd>\n\t\t<\/div>\n\t<\/p>\n<\/div>\n\n<div style=\"display: none;\" class=\"wpProQuiz_results\">\n\t<h4 class=\"wpProQuiz_header\">Results<\/h4>\n\t<p><span class=\"wpProQuiz_correct_answer\">0<\/span> of <span>15<\/span> Questions answered correctly<\/p>\t\t<p class=\"wpProQuiz_quiz_time\">\n\t\tYour time: <span><\/span>\t\t<\/p>\n\t\t\t<p class=\"wpProQuiz_time_limit_expired\" style=\"display: none;\">\n\tTime has elapsed\t<\/p>\n\n\t\t\t<p class=\"wpProQuiz_points\">\n\t\tYou have reached <span>0<\/span> of <span>0<\/span> point(s), (<span>0<\/span>)\t\t<\/p>\n\t\t<p class=\"wpProQuiz_graded_points\" style=\"display: none;\">\n\t\tEarned Point(s): <span>0<\/span> of <span>0<\/span>, (<span>0<\/span>)\t\t<br \/>\n\t\t<span>0<\/span> Essay(s) Pending (Possible Point(s): <span>0<\/span>)\t\t<br \/>\n\t\t<\/p>\n\t\t\n\t<div class=\"wpProQuiz_catOverview\" style=\"display:none;\">\n\t\t<h4>\n\t\tCategories\t\t<\/h4>\n\n\t\t<div style=\"margin-top: 10px;\">\n\t\t\t<ol>\n\t\t\t\t\t\t\t<li data-category_id=\"0\">\n\t\t\t\t\t<span class=\"wpProQuiz_catName\">Not categorized<\/span>\n\t\t\t\t\t<span class=\"wpProQuiz_catPercent\">0%<\/span>\n\t\t\t\t<\/li>\n\t\t\t\t\t\t\t<\/ol>\n\t\t<\/div>\n\t<\/div>\n\t<div>\n\t\t<ul class=\"wpProQuiz_resultsList\">\n\t\t\t\t\t\t\t<li style=\"display: none;\">\n\t\t\t\t\t<div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/li>\n\t\t\t\t\t<\/ul>\n\t<\/div>\n\t\t<div class=\"ld-quiz-actions\" style=\"margin: 10px 0px;\">\n\t\t\t\t<div class='quiz_continue_link\n\t\t\t\t'>\n\n\t\t<\/div>\n\t\t\t\t\t<input class=\"wpProQuiz_button wpProQuiz_button_restartQuiz\" type=\"button\" name=\"restartQuiz\"\n\t\t\t\t\tvalue=\"Restart Quiz\"\/>\t\t\t\t\t\t<input class=\"wpProQuiz_button wpProQuiz_button_reShowQuestion\" type=\"button\" name=\"reShowQuestion\"\n\t\t\t\t\tvalue=\"View Questions\" \/>\t\t\t\t\t<\/div>\n<\/div>\n<div class=\"wpProQuiz_reviewDiv\" style=\"display: none;\">\n\t<div class=\"wpProQuiz_reviewQuestion\">\n\t<ol>\n\t\t\t\t\t<li>1<\/li>\n\t\t\t\t\t<li>2<\/li>\n\t\t\t\t\t<li>3<\/li>\n\t\t\t\t\t<li>4<\/li>\n\t\t\t\t\t<li>5<\/li>\n\t\t\t\t\t<li>6<\/li>\n\t\t\t\t\t<li>7<\/li>\n\t\t\t\t\t<li>8<\/li>\n\t\t\t\t\t<li>9<\/li>\n\t\t\t\t\t<li>10<\/li>\n\t\t\t\t\t<li>11<\/li>\n\t\t\t\t\t<li>12<\/li>\n\t\t\t\t\t<li>13<\/li>\n\t\t\t\t\t<li>14<\/li>\n\t\t\t\t\t<li>15<\/li>\n\t\t\t<\/ol>\n\t<div style=\"display: none;\"><\/div>\n<\/div>\n<div class=\"wpProQuiz_reviewLegend\">\n\t<ol>\n\t\t<li class=\"learndash-quiz-review-legend-item-current\">\n\t\t\t<span class=\"wpProQuiz_reviewColor wpProQuiz_reviewQuestion_Target\"><\/span>\n\t\t\t<span class=\"wpProQuiz_reviewText\">Current<\/span>\n\t\t<\/li>\n\t\t<li class=\"learndash-quiz-review-legend-item-review\">\n\t\t\t<span class=\"wpProQuiz_reviewColor wpProQuiz_reviewColor_Review\"><\/span>\n\t\t\t<span class=\"wpProQuiz_reviewText\">Review \/ Skip<\/span>\n\t\t<\/li>\n\t\t<li class=\"learndash-quiz-review-legend-item-answered\">\n\t\t\t<span class=\"wpProQuiz_reviewColor wpProQuiz_reviewColor_Answer\"><\/span>\n\t\t\t<span class=\"wpProQuiz_reviewText\">Answered<\/span>\n\t\t<\/li>\n\t\t<li class=\"learndash-quiz-review-legend-item-correct\">\n\t\t\t<span class=\"wpProQuiz_reviewColor wpProQuiz_reviewColor_AnswerCorrect\"><\/span>\n\t\t\t<span class=\"wpProQuiz_reviewText\">Correct<\/span>\n\t\t<\/li>\n\t\t<li class=\"learndash-quiz-review-legend-item-incorrect\">\n\t\t\t<span class=\"wpProQuiz_reviewColor wpProQuiz_reviewColor_AnswerIncorrect\"><\/span>\n\t\t\t<span class=\"wpProQuiz_reviewText\">Incorrect<\/span>\n\t\t<\/li>\n\t<\/ol>\n\t<div style=\"clear: both;\"><\/div>\n<\/div>\n<div class=\"wpProQuiz_reviewButtons\">\n\t\t\t<input type=\"button\" name=\"review\" value=\"Review Question\" class=\"wpProQuiz_button2\" style=\"float: left; display: block;\"> \t\t\t\t\t<input type=\"button\" name=\"quizSummary\" value=\"Quiz Summary\" class=\"wpProQuiz_button2\" style=\"float: right;\"> \t\t\t\t<div style=\"clear: both;\"><\/div>\n\t<\/div>\n<\/div>\n<div class=\"wpProQuiz_quizAnker\" style=\"display: none;\"><\/div>\n<div style=\"display: none;\" class=\"wpProQuiz_quiz\">\n\t<ol class=\"wpProQuiz_list\">\n\t\t\t\t\t<li class=\"wpProQuiz_listItem\" style=\"display: none;\" data-type=\"single\" data-question-meta=\"{&quot;type&quot;:&quot;single&quot;,&quot;question_pro_id&quot;:5571,&quot;question_post_id&quot;:99180}\">\n\t\t\t\t<div class=\"wpProQuiz_question_page\" style=\"display:none;\" >\n\t\t\t\tQuestion <span>1<\/span> of <span>15<\/span>\t\t\t\t<\/div>\n\t\t\t\t<h5 style=\"display: inline-block;\" class=\"wpProQuiz_header\">\n\t\t\t\t\t<span>1<\/span>. Question\n\t\t\t\t<\/h5>\n\n\t\t\t\t\n\t\t\t\t\t\t\t\t<div class=\"wpProQuiz_question\" style=\"margin: 10px 0px 0px 0px;\">\n\t\t\t\t\t<div class=\"wpProQuiz_question_text\">\n\t\t\t\t\t\t<p><span style=\"font-weight: 400\">#include &lt;bits\/stdc++.h&gt;<\/span><\/p>\n<p><span style=\"font-weight: 400\">using namespace std;<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u00a0<\/span><\/p>\n<p><span style=\"font-weight: 400\">struct Node {<\/span><\/p>\n<p><span style=\"font-weight: 400\">int data;<\/span><\/p>\n<p><span style=\"font-weight: 400\">struct Node* left;<\/span><\/p>\n<p><span style=\"font-weight: 400\">struct Node* right;<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u00a0<\/span><\/p>\n<p><span style=\"font-weight: 400\">Node(int val)<\/span><\/p>\n<p><span style=\"font-weight: 400\">{<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u00a0\u00a0\u00a0\u00a0<\/span> <span style=\"font-weight: 400\">data = val;<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u00a0\u00a0\u00a0\u00a0<\/span> <span style=\"font-weight: 400\">left = NULL;<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u00a0\u00a0\u00a0\u00a0<\/span> <span style=\"font-weight: 400\">right = NULL;<\/span><\/p>\n<p><span style=\"font-weight: 400\">}<\/span><\/p>\n<p><span style=\"font-weight: 400\">};<\/span><\/p>\n<p>\u00a0<\/p>\n<p><span style=\"font-weight: 400\">int main()<\/span><\/p>\n<p><span style=\"font-weight: 400\">{<\/span><\/p>\n<p><span style=\"font-weight: 400\">struct Node* root = new Node(1);<\/span><\/p>\n<p><span style=\"font-weight: 400\">root-&gt;left = new Node(2);<\/span><\/p>\n<p><span style=\"font-weight: 400\">root-&gt;right = new Node(3);<\/span><\/p>\n<p><span style=\"font-weight: 400\">root-&gt;left-&gt;left = new Node(4);<\/span><\/p>\n<p><span style=\"font-weight: 400\">cout&lt;&lt;root-&gt;data;<\/span><\/p>\n<p><span style=\"font-weight: 400\">return 0;<\/span><\/p>\n<p><span style=\"font-weight: 400\">}<\/span><\/p>\n<p>\u00a0<\/p>\n\t\t\t\t\t<\/div>\n\t\t\t\t\t<p class=\"wpProQuiz_clear\" style=\"clear:both;\"><\/p>\n\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t<ul class=\"wpProQuiz_questionList\" data-question_id=\"5571\"\n\t\t\t\t\t\tdata-type=\"single\">\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t<li class=\"wpProQuiz_questionListItem\" data-pos=\"0\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span style=\"display:none;\"><\/span>\n\t\t\t\t\t\t\t\t\t\t<label>\n\t\t\t\t\t\t\t\t\t\t\t<input class=\"wpProQuiz_questionInput\" autocomplete=\"off\"\n\t\t\t\t\t\t\t\t\t\t\t\t\ttype=\"radio\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tname=\"question_349_5571\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tvalue=\"1\"> 2\t\t\t\t\t\t\t\t\t\t<\/label>\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<\/li>\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t<li class=\"wpProQuiz_questionListItem\" data-pos=\"1\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span style=\"display:none;\"><\/span>\n\t\t\t\t\t\t\t\t\t\t<label>\n\t\t\t\t\t\t\t\t\t\t\t<input class=\"wpProQuiz_questionInput\" autocomplete=\"off\"\n\t\t\t\t\t\t\t\t\t\t\t\t\ttype=\"radio\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tname=\"question_349_5571\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tvalue=\"2\"> 3\t\t\t\t\t\t\t\t\t\t<\/label>\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<\/li>\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t<li class=\"wpProQuiz_questionListItem\" data-pos=\"2\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span style=\"display:none;\"><\/span>\n\t\t\t\t\t\t\t\t\t\t<label>\n\t\t\t\t\t\t\t\t\t\t\t<input class=\"wpProQuiz_questionInput\" autocomplete=\"off\"\n\t\t\t\t\t\t\t\t\t\t\t\t\ttype=\"radio\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tname=\"question_349_5571\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tvalue=\"3\"> 1\t\t\t\t\t\t\t\t\t\t<\/label>\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<\/li>\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t<li class=\"wpProQuiz_questionListItem\" data-pos=\"3\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span style=\"display:none;\"><\/span>\n\t\t\t\t\t\t\t\t\t\t<label>\n\t\t\t\t\t\t\t\t\t\t\t<input class=\"wpProQuiz_questionInput\" autocomplete=\"off\"\n\t\t\t\t\t\t\t\t\t\t\t\t\ttype=\"radio\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tname=\"question_349_5571\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tvalue=\"4\"> 4\t\t\t\t\t\t\t\t\t\t<\/label>\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<\/li>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<\/ul>\n\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t\t\t\t\t\t<div class=\"wpProQuiz_response\" style=\"display: none;\">\n\t\t\t\t\t\t<div style=\"display: none;\" class=\"wpProQuiz_correct\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span>\n\t\t\t\t\t\t\t\tCorrect\t\t\t\t\t\t\t\t<\/span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"wpProQuiz_AnswerMessage\"><\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t\t\t<div style=\"display: none;\" class=\"wpProQuiz_incorrect\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span>\n\t\t\t\t\t\t\t\tIncorrect\t\t\t\t\t\t\t<\/span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"wpProQuiz_AnswerMessage\"><\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\t\t\t\t<input type=\"button\" name=\"skip\" value=\"Skip question\" class=\"wpProQuiz_button wpProQuiz_QuestionButton\" style=\"float: left; margin-right: 10px ;\"> \t\t\t\t\t\t\t\t\t\t\t\t<input type=\"button\" name=\"back\" value=\"Back\" class=\"wpProQuiz_button wpProQuiz_QuestionButton\" style=\"float: left ; margin-right: 10px ; display: none;\"> \t\t\t\t\t\t\t\t\t\t\t\t<input type=\"button\" name=\"check\" value=\"Check\" class=\"wpProQuiz_button wpProQuiz_QuestionButton\" style=\"float: right ; margin-right: 10px ; display: none;\"> \t\t\t\t\t\t\t\t<input type=\"button\" name=\"next\" value=\"Next\" class=\"wpProQuiz_button wpProQuiz_QuestionButton\" style=\"float: right; display: none;\"> \t\t\t\t\t\t\t\t<div style=\"clear: both;\"><\/div>\n\n\t\t\t\t\t\t\t<\/li>\n\n\t\t\t\t\t<li class=\"wpProQuiz_listItem\" style=\"display: none;\" data-type=\"single\" data-question-meta=\"{&quot;type&quot;:&quot;single&quot;,&quot;question_pro_id&quot;:5572,&quot;question_post_id&quot;:99181}\">\n\t\t\t\t<div class=\"wpProQuiz_question_page\" style=\"display:none;\" >\n\t\t\t\tQuestion <span>2<\/span> of <span>15<\/span>\t\t\t\t<\/div>\n\t\t\t\t<h5 style=\"display: inline-block;\" class=\"wpProQuiz_header\">\n\t\t\t\t\t<span>2<\/span>. Question\n\t\t\t\t<\/h5>\n\n\t\t\t\t\n\t\t\t\t\t\t\t\t<div class=\"wpProQuiz_question\" style=\"margin: 10px 0px 0px 0px;\">\n\t\t\t\t\t<div class=\"wpProQuiz_question_text\">\n\t\t\t\t\t\t<p><span style=\"font-weight: 400\">#include &lt;bits\/stdc++.h&gt;<\/span><\/p>\n<p><span style=\"font-weight: 400\">using namespace std;<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u00a0<\/span><\/p>\n<p><span style=\"font-weight: 400\">struct Node {<\/span><\/p>\n<p><span style=\"font-weight: 400\">int data;<\/span><\/p>\n<p><span style=\"font-weight: 400\">struct Node* left;<\/span><\/p>\n<p><span style=\"font-weight: 400\">struct Node* right;<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u00a0<\/span><\/p>\n<p><span style=\"font-weight: 400\">Node(int val)<\/span><\/p>\n<p><span style=\"font-weight: 400\">{<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u00a0\u00a0\u00a0\u00a0<\/span> <span style=\"font-weight: 400\">data = val;<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u00a0\u00a0\u00a0\u00a0<\/span> <span style=\"font-weight: 400\">left = NULL;<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u00a0\u00a0\u00a0\u00a0<\/span> <span style=\"font-weight: 400\">right = NULL;<\/span><\/p>\n<p><span style=\"font-weight: 400\">}<\/span><\/p>\n<p><span style=\"font-weight: 400\">};<\/span><\/p>\n<p>\u00a0<\/p>\n<p><span style=\"font-weight: 400\">int main()<\/span><\/p>\n<p><span style=\"font-weight: 400\">{<\/span><\/p>\n<p><span style=\"font-weight: 400\">struct Node* root = new Node(1);<\/span><\/p>\n<p><span style=\"font-weight: 400\">root-&gt;left = new Node(2);<\/span><\/p>\n<p><span style=\"font-weight: 400\">root-&gt;right = new Node(3);<\/span><\/p>\n<p><span style=\"font-weight: 400\">root-&gt;left-&gt;left = new Node(4);<\/span><\/p>\n<p><span style=\"font-weight: 400\">cout&lt;&lt;root-&gt;left-&gt;left-&gt;data;<\/span><\/p>\n<p><span style=\"font-weight: 400\">return 0;<\/span><\/p>\n<p><span style=\"font-weight: 400\">}<\/span><\/p>\n\t\t\t\t\t<\/div>\n\t\t\t\t\t<p class=\"wpProQuiz_clear\" style=\"clear:both;\"><\/p>\n\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t<ul class=\"wpProQuiz_questionList\" data-question_id=\"5572\"\n\t\t\t\t\t\tdata-type=\"single\">\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t<li class=\"wpProQuiz_questionListItem\" data-pos=\"0\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span style=\"display:none;\"><\/span>\n\t\t\t\t\t\t\t\t\t\t<label>\n\t\t\t\t\t\t\t\t\t\t\t<input class=\"wpProQuiz_questionInput\" autocomplete=\"off\"\n\t\t\t\t\t\t\t\t\t\t\t\t\ttype=\"radio\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tname=\"question_349_5572\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tvalue=\"1\"> 2\n\t\t\t\t\t\t\t\t\t\t<\/label>\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<\/li>\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t<li class=\"wpProQuiz_questionListItem\" data-pos=\"1\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span style=\"display:none;\"><\/span>\n\t\t\t\t\t\t\t\t\t\t<label>\n\t\t\t\t\t\t\t\t\t\t\t<input class=\"wpProQuiz_questionInput\" autocomplete=\"off\"\n\t\t\t\t\t\t\t\t\t\t\t\t\ttype=\"radio\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tname=\"question_349_5572\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tvalue=\"2\"> 3\t\t\t\t\t\t\t\t\t\t<\/label>\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<\/li>\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t<li class=\"wpProQuiz_questionListItem\" data-pos=\"2\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span style=\"display:none;\"><\/span>\n\t\t\t\t\t\t\t\t\t\t<label>\n\t\t\t\t\t\t\t\t\t\t\t<input class=\"wpProQuiz_questionInput\" autocomplete=\"off\"\n\t\t\t\t\t\t\t\t\t\t\t\t\ttype=\"radio\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tname=\"question_349_5572\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tvalue=\"3\"> 1\t\t\t\t\t\t\t\t\t\t<\/label>\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<\/li>\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t<li class=\"wpProQuiz_questionListItem\" data-pos=\"3\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span style=\"display:none;\"><\/span>\n\t\t\t\t\t\t\t\t\t\t<label>\n\t\t\t\t\t\t\t\t\t\t\t<input class=\"wpProQuiz_questionInput\" autocomplete=\"off\"\n\t\t\t\t\t\t\t\t\t\t\t\t\ttype=\"radio\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tname=\"question_349_5572\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tvalue=\"4\"> 4\t\t\t\t\t\t\t\t\t\t<\/label>\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<\/li>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<\/ul>\n\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t\t\t\t\t\t<div class=\"wpProQuiz_response\" style=\"display: none;\">\n\t\t\t\t\t\t<div style=\"display: none;\" class=\"wpProQuiz_correct\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span>\n\t\t\t\t\t\t\t\tCorrect\t\t\t\t\t\t\t\t<\/span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"wpProQuiz_AnswerMessage\"><\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t\t\t<div style=\"display: none;\" class=\"wpProQuiz_incorrect\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span>\n\t\t\t\t\t\t\t\tIncorrect\t\t\t\t\t\t\t<\/span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"wpProQuiz_AnswerMessage\"><\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\t\t\t\t<input type=\"button\" name=\"skip\" value=\"Skip question\" class=\"wpProQuiz_button wpProQuiz_QuestionButton\" style=\"float: left; margin-right: 10px ;\"> \t\t\t\t\t\t\t\t\t\t\t\t<input type=\"button\" name=\"back\" value=\"Back\" class=\"wpProQuiz_button wpProQuiz_QuestionButton\" style=\"float: left ; margin-right: 10px ; display: none;\"> \t\t\t\t\t\t\t\t\t\t\t\t<input type=\"button\" name=\"check\" value=\"Check\" class=\"wpProQuiz_button wpProQuiz_QuestionButton\" style=\"float: right ; margin-right: 10px ; display: none;\"> \t\t\t\t\t\t\t\t<input type=\"button\" name=\"next\" value=\"Next\" class=\"wpProQuiz_button wpProQuiz_QuestionButton\" style=\"float: right; display: none;\"> \t\t\t\t\t\t\t\t<div style=\"clear: both;\"><\/div>\n\n\t\t\t\t\t\t\t<\/li>\n\n\t\t\t\t\t<li class=\"wpProQuiz_listItem\" style=\"display: none;\" data-type=\"single\" data-question-meta=\"{&quot;type&quot;:&quot;single&quot;,&quot;question_pro_id&quot;:5573,&quot;question_post_id&quot;:99182}\">\n\t\t\t\t<div class=\"wpProQuiz_question_page\" style=\"display:none;\" >\n\t\t\t\tQuestion <span>3<\/span> of <span>15<\/span>\t\t\t\t<\/div>\n\t\t\t\t<h5 style=\"display: inline-block;\" class=\"wpProQuiz_header\">\n\t\t\t\t\t<span>3<\/span>. Question\n\t\t\t\t<\/h5>\n\n\t\t\t\t\n\t\t\t\t\t\t\t\t<div class=\"wpProQuiz_question\" style=\"margin: 10px 0px 0px 0px;\">\n\t\t\t\t\t<div class=\"wpProQuiz_question_text\">\n\t\t\t\t\t\t<p><span style=\"font-weight: 400\">#include &lt;bits\/stdc++.h&gt;<\/span><\/p>\n<p><span style=\"font-weight: 400\">using namespace std;<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u00a0<\/span><\/p>\n<p><span style=\"font-weight: 400\">struct Node {<\/span><\/p>\n<p><span style=\"font-weight: 400\">int data;<\/span><\/p>\n<p><span style=\"font-weight: 400\">struct Node* left;<\/span><\/p>\n<p><span style=\"font-weight: 400\">struct Node* right;<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u00a0<\/span><\/p>\n<p><span style=\"font-weight: 400\">Node(int val)<\/span><\/p>\n<p><span style=\"font-weight: 400\">{<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u00a0\u00a0\u00a0\u00a0<\/span> <span style=\"font-weight: 400\">data = val;<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u00a0\u00a0\u00a0\u00a0<\/span> <span style=\"font-weight: 400\">left = NULL;<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u00a0\u00a0\u00a0\u00a0<\/span> <span style=\"font-weight: 400\">right = NULL;<\/span><\/p>\n<p><span style=\"font-weight: 400\">}<\/span><\/p>\n<p><span style=\"font-weight: 400\">};<\/span><\/p>\n<p>\u00a0<\/p>\n<p><span style=\"font-weight: 400\">void Preorder(struct Node* node)<\/span><\/p>\n<p><span style=\"font-weight: 400\">{<\/span><\/p>\n<p><span style=\"font-weight: 400\">if (node == NULL)<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u00a0\u00a0\u00a0\u00a0<\/span> <span style=\"font-weight: 400\">return;<\/span><\/p>\n<p><span style=\"font-weight: 400\">cout &lt;&lt; node-&gt;data &lt;&lt; &#8221; &#8220;;<\/span><\/p>\n<p><span style=\"font-weight: 400\">Preorder(node-&gt;left);<\/span><\/p>\n<p><span style=\"font-weight: 400\">Preorder(node-&gt;right);<\/span><\/p>\n<p><span style=\"font-weight: 400\">}<\/span><\/p>\n<p><span style=\"font-weight: 400\">int main()<\/span><\/p>\n<p><span style=\"font-weight: 400\">{<\/span><\/p>\n<p><span style=\"font-weight: 400\">struct Node* root = new Node(1);<\/span><\/p>\n<p><span style=\"font-weight: 400\">root-&gt;left = new Node(2);<\/span><\/p>\n<p><span style=\"font-weight: 400\">root-&gt;right = new Node(3);<\/span><\/p>\n<p><span style=\"font-weight: 400\">root-&gt;left-&gt;left = new Node(4);<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u00a0\u00a0\u00a0\u00a0<\/span><\/p>\n<p><span style=\"font-weight: 400\">Preorder(root);<\/span><\/p>\n<p><span style=\"font-weight: 400\">return 0;<\/span><\/p>\n<p><span style=\"font-weight: 400\">}<\/span><\/p>\n\t\t\t\t\t<\/div>\n\t\t\t\t\t<p class=\"wpProQuiz_clear\" style=\"clear:both;\"><\/p>\n\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t<ul class=\"wpProQuiz_questionList\" data-question_id=\"5573\"\n\t\t\t\t\t\tdata-type=\"single\">\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t<li class=\"wpProQuiz_questionListItem\" data-pos=\"0\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span style=\"display:none;\"><\/span>\n\t\t\t\t\t\t\t\t\t\t<label>\n\t\t\t\t\t\t\t\t\t\t\t<input class=\"wpProQuiz_questionInput\" autocomplete=\"off\"\n\t\t\t\t\t\t\t\t\t\t\t\t\ttype=\"radio\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tname=\"question_349_5573\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tvalue=\"1\"> 1 2 4 3\t\t\t\t\t\t\t\t\t\t<\/label>\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<\/li>\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t<li class=\"wpProQuiz_questionListItem\" data-pos=\"1\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span style=\"display:none;\"><\/span>\n\t\t\t\t\t\t\t\t\t\t<label>\n\t\t\t\t\t\t\t\t\t\t\t<input class=\"wpProQuiz_questionInput\" autocomplete=\"off\"\n\t\t\t\t\t\t\t\t\t\t\t\t\ttype=\"radio\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tname=\"question_349_5573\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tvalue=\"2\">  2 1 3 4\t\t\t\t\t\t\t\t\t\t<\/label>\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<\/li>\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t<li class=\"wpProQuiz_questionListItem\" data-pos=\"2\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span style=\"display:none;\"><\/span>\n\t\t\t\t\t\t\t\t\t\t<label>\n\t\t\t\t\t\t\t\t\t\t\t<input class=\"wpProQuiz_questionInput\" autocomplete=\"off\"\n\t\t\t\t\t\t\t\t\t\t\t\t\ttype=\"radio\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tname=\"question_349_5573\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tvalue=\"3\"> 3 4 2 1\t\t\t\t\t\t\t\t\t\t<\/label>\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<\/li>\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t<li class=\"wpProQuiz_questionListItem\" data-pos=\"3\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span style=\"display:none;\"><\/span>\n\t\t\t\t\t\t\t\t\t\t<label>\n\t\t\t\t\t\t\t\t\t\t\t<input class=\"wpProQuiz_questionInput\" autocomplete=\"off\"\n\t\t\t\t\t\t\t\t\t\t\t\t\ttype=\"radio\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tname=\"question_349_5573\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tvalue=\"4\"> 4 2 3 1\t\t\t\t\t\t\t\t\t\t<\/label>\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<\/li>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<\/ul>\n\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t\t\t\t\t\t<div class=\"wpProQuiz_response\" style=\"display: none;\">\n\t\t\t\t\t\t<div style=\"display: none;\" class=\"wpProQuiz_correct\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span>\n\t\t\t\t\t\t\t\tCorrect\t\t\t\t\t\t\t\t<\/span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"wpProQuiz_AnswerMessage\"><\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t\t\t<div style=\"display: none;\" class=\"wpProQuiz_incorrect\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span>\n\t\t\t\t\t\t\t\tIncorrect\t\t\t\t\t\t\t<\/span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"wpProQuiz_AnswerMessage\"><\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\t\t\t\t<input type=\"button\" name=\"skip\" value=\"Skip question\" class=\"wpProQuiz_button wpProQuiz_QuestionButton\" style=\"float: left; margin-right: 10px ;\"> \t\t\t\t\t\t\t\t\t\t\t\t<input type=\"button\" name=\"back\" value=\"Back\" class=\"wpProQuiz_button wpProQuiz_QuestionButton\" style=\"float: left ; margin-right: 10px ; display: none;\"> \t\t\t\t\t\t\t\t\t\t\t\t<input type=\"button\" name=\"check\" value=\"Check\" class=\"wpProQuiz_button wpProQuiz_QuestionButton\" style=\"float: right ; margin-right: 10px ; display: none;\"> \t\t\t\t\t\t\t\t<input type=\"button\" name=\"next\" value=\"Next\" class=\"wpProQuiz_button wpProQuiz_QuestionButton\" style=\"float: right; display: none;\"> \t\t\t\t\t\t\t\t<div style=\"clear: both;\"><\/div>\n\n\t\t\t\t\t\t\t<\/li>\n\n\t\t\t\t\t<li class=\"wpProQuiz_listItem\" style=\"display: none;\" data-type=\"single\" data-question-meta=\"{&quot;type&quot;:&quot;single&quot;,&quot;question_pro_id&quot;:5574,&quot;question_post_id&quot;:99183}\">\n\t\t\t\t<div class=\"wpProQuiz_question_page\" style=\"display:none;\" >\n\t\t\t\tQuestion <span>4<\/span> of <span>15<\/span>\t\t\t\t<\/div>\n\t\t\t\t<h5 style=\"display: inline-block;\" class=\"wpProQuiz_header\">\n\t\t\t\t\t<span>4<\/span>. Question\n\t\t\t\t<\/h5>\n\n\t\t\t\t\n\t\t\t\t\t\t\t\t<div class=\"wpProQuiz_question\" style=\"margin: 10px 0px 0px 0px;\">\n\t\t\t\t\t<div class=\"wpProQuiz_question_text\">\n\t\t\t\t\t\t<p><span style=\"font-weight: 400\">#include &lt;bits\/stdc++.h&gt;<\/span><\/p>\n<p><span style=\"font-weight: 400\">using namespace std;<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u00a0<\/span><\/p>\n<p><span style=\"font-weight: 400\">struct Node {<\/span><\/p>\n<p><span style=\"font-weight: 400\">int data;<\/span><\/p>\n<p><span style=\"font-weight: 400\">struct Node* left;<\/span><\/p>\n<p><span style=\"font-weight: 400\">struct Node* right;<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u00a0<\/span><\/p>\n<p><span style=\"font-weight: 400\">Node(int val)<\/span><\/p>\n<p><span style=\"font-weight: 400\">{<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u00a0\u00a0\u00a0\u00a0<\/span> <span style=\"font-weight: 400\">data = val;<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u00a0\u00a0\u00a0\u00a0<\/span> <span style=\"font-weight: 400\">left = NULL;<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u00a0\u00a0\u00a0\u00a0<\/span> <span style=\"font-weight: 400\">right = NULL;<\/span><\/p>\n<p><span style=\"font-weight: 400\">}<\/span><\/p>\n<p><span style=\"font-weight: 400\">};<\/span><\/p>\n<p><span style=\"font-weight: 400\">int height(Node *root)<\/span><\/p>\n<p><span style=\"font-weight: 400\">{<\/span><\/p>\n<p><span style=\"font-weight: 400\">int l = INT_MAX, r = INT_MAX;<\/span><\/p>\n<p><span style=\"font-weight: 400\">if (root == NULL)<\/span><\/p>\n<p><span style=\"font-weight: 400\">return 0;<\/span><\/p>\n<p><span style=\"font-weight: 400\">if (root-&gt;left == NULL &amp;&amp; root-&gt;right == NULL)<\/span><\/p>\n<p><span style=\"font-weight: 400\">return 1;<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u00a0\u00a0\u00a0<\/span><\/p>\n<p><span style=\"font-weight: 400\">if (root-&gt;left)<\/span><\/p>\n<p><span style=\"font-weight: 400\">l = height(root-&gt;left);<\/span><\/p>\n<p><span style=\"font-weight: 400\">if (root-&gt;right)<\/span><\/p>\n<p><span style=\"font-weight: 400\">r =\u00a0 height(root-&gt;right);<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u00a0<\/span><\/p>\n<p><span style=\"font-weight: 400\">return min(l , r) + 1;<\/span><\/p>\n<p><span style=\"font-weight: 400\">}<\/span><\/p>\n<p><span style=\"font-weight: 400\">int main()<\/span><\/p>\n<p><span style=\"font-weight: 400\">{<\/span><\/p>\n<p><span style=\"font-weight: 400\">struct Node* root = new Node(13);<\/span><\/p>\n<p><span style=\"font-weight: 400\">root-&gt;left = new Node(8);<\/span><\/p>\n<p><span style=\"font-weight: 400\">root-&gt;right = new Node(6);<\/span><\/p>\n<p><span style=\"font-weight: 400\">root-&gt;left-&gt;right = new Node(7);<\/span><\/p>\n<p><span style=\"font-weight: 400\">cout&lt;&lt;height(root);<\/span><\/p>\n<p><span style=\"font-weight: 400\">return 0;<\/span><\/p>\n<p><span style=\"font-weight: 400\">}<\/span><\/p>\n<p>\u00a0<\/p>\n\t\t\t\t\t<\/div>\n\t\t\t\t\t<p class=\"wpProQuiz_clear\" style=\"clear:both;\"><\/p>\n\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t<ul class=\"wpProQuiz_questionList\" data-question_id=\"5574\"\n\t\t\t\t\t\tdata-type=\"single\">\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t<li class=\"wpProQuiz_questionListItem\" data-pos=\"0\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span style=\"display:none;\"><\/span>\n\t\t\t\t\t\t\t\t\t\t<label>\n\t\t\t\t\t\t\t\t\t\t\t<input class=\"wpProQuiz_questionInput\" autocomplete=\"off\"\n\t\t\t\t\t\t\t\t\t\t\t\t\ttype=\"radio\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tname=\"question_349_5574\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tvalue=\"1\"> 2\t\t\t\t\t\t\t\t\t\t<\/label>\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<\/li>\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t<li class=\"wpProQuiz_questionListItem\" data-pos=\"1\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span style=\"display:none;\"><\/span>\n\t\t\t\t\t\t\t\t\t\t<label>\n\t\t\t\t\t\t\t\t\t\t\t<input class=\"wpProQuiz_questionInput\" autocomplete=\"off\"\n\t\t\t\t\t\t\t\t\t\t\t\t\ttype=\"radio\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tname=\"question_349_5574\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tvalue=\"2\"> 1\t\t\t\t\t\t\t\t\t\t<\/label>\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<\/li>\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t<li class=\"wpProQuiz_questionListItem\" data-pos=\"2\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span style=\"display:none;\"><\/span>\n\t\t\t\t\t\t\t\t\t\t<label>\n\t\t\t\t\t\t\t\t\t\t\t<input class=\"wpProQuiz_questionInput\" autocomplete=\"off\"\n\t\t\t\t\t\t\t\t\t\t\t\t\ttype=\"radio\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tname=\"question_349_5574\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tvalue=\"3\"> \t\t\t\t\t\t\t\t\t\t<\/label>\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<\/li>\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t<li class=\"wpProQuiz_questionListItem\" data-pos=\"3\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span style=\"display:none;\"><\/span>\n\t\t\t\t\t\t\t\t\t\t<label>\n\t\t\t\t\t\t\t\t\t\t\t<input class=\"wpProQuiz_questionInput\" autocomplete=\"off\"\n\t\t\t\t\t\t\t\t\t\t\t\t\ttype=\"radio\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tname=\"question_349_5574\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tvalue=\"4\"> 3\t\t\t\t\t\t\t\t\t\t<\/label>\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<\/li>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<\/ul>\n\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t\t\t\t\t\t<div class=\"wpProQuiz_response\" style=\"display: none;\">\n\t\t\t\t\t\t<div style=\"display: none;\" class=\"wpProQuiz_correct\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span>\n\t\t\t\t\t\t\t\tCorrect\t\t\t\t\t\t\t\t<\/span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"wpProQuiz_AnswerMessage\"><\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t\t\t<div style=\"display: none;\" class=\"wpProQuiz_incorrect\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span>\n\t\t\t\t\t\t\t\tIncorrect\t\t\t\t\t\t\t<\/span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"wpProQuiz_AnswerMessage\"><\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\t\t\t\t<input type=\"button\" name=\"skip\" value=\"Skip question\" class=\"wpProQuiz_button wpProQuiz_QuestionButton\" style=\"float: left; margin-right: 10px ;\"> \t\t\t\t\t\t\t\t\t\t\t\t<input type=\"button\" name=\"back\" value=\"Back\" class=\"wpProQuiz_button wpProQuiz_QuestionButton\" style=\"float: left ; margin-right: 10px ; display: none;\"> \t\t\t\t\t\t\t\t\t\t\t\t<input type=\"button\" name=\"check\" value=\"Check\" class=\"wpProQuiz_button wpProQuiz_QuestionButton\" style=\"float: right ; margin-right: 10px ; display: none;\"> \t\t\t\t\t\t\t\t<input type=\"button\" name=\"next\" value=\"Next\" class=\"wpProQuiz_button wpProQuiz_QuestionButton\" style=\"float: right; display: none;\"> \t\t\t\t\t\t\t\t<div style=\"clear: both;\"><\/div>\n\n\t\t\t\t\t\t\t<\/li>\n\n\t\t\t\t\t<li class=\"wpProQuiz_listItem\" style=\"display: none;\" data-type=\"single\" data-question-meta=\"{&quot;type&quot;:&quot;single&quot;,&quot;question_pro_id&quot;:5575,&quot;question_post_id&quot;:99184}\">\n\t\t\t\t<div class=\"wpProQuiz_question_page\" style=\"display:none;\" >\n\t\t\t\tQuestion <span>5<\/span> of <span>15<\/span>\t\t\t\t<\/div>\n\t\t\t\t<h5 style=\"display: inline-block;\" class=\"wpProQuiz_header\">\n\t\t\t\t\t<span>5<\/span>. Question\n\t\t\t\t<\/h5>\n\n\t\t\t\t\n\t\t\t\t\t\t\t\t<div class=\"wpProQuiz_question\" style=\"margin: 10px 0px 0px 0px;\">\n\t\t\t\t\t<div class=\"wpProQuiz_question_text\">\n\t\t\t\t\t\t<p><span style=\"font-weight: 400\">#include &lt;bits\/stdc++.h&gt;<\/span><\/p>\n<p><span style=\"font-weight: 400\">using namespace std;<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u00a0<\/span><\/p>\n<p><span style=\"font-weight: 400\">struct Node {<\/span><\/p>\n<p><span style=\"font-weight: 400\">int data;<\/span><\/p>\n<p><span style=\"font-weight: 400\">struct Node* left;<\/span><\/p>\n<p><span style=\"font-weight: 400\">struct Node* right;<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u00a0<\/span><\/p>\n<p><span style=\"font-weight: 400\">Node(int val)<\/span><\/p>\n<p><span style=\"font-weight: 400\">{<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u00a0\u00a0\u00a0\u00a0<\/span> <span style=\"font-weight: 400\">data = val;<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u00a0\u00a0\u00a0\u00a0<\/span> <span style=\"font-weight: 400\">left = NULL;<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u00a0\u00a0\u00a0\u00a0<\/span> <span style=\"font-weight: 400\">right = NULL;<\/span><\/p>\n<p><span style=\"font-weight: 400\">}<\/span><\/p>\n<p><span style=\"font-weight: 400\">};<\/span><\/p>\n<p>\u00a0<\/p>\n<p><span style=\"font-weight: 400\">void Inorder(struct Node* node)<\/span><\/p>\n<p><span style=\"font-weight: 400\">{<\/span><\/p>\n<p><span style=\"font-weight: 400\">if (node == NULL)<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u00a0\u00a0\u00a0\u00a0<\/span> <span style=\"font-weight: 400\">return;<\/span><\/p>\n<p><span style=\"font-weight: 400\">Inorder(node-&gt;left);<\/span><\/p>\n<p><span style=\"font-weight: 400\">cout &lt;&lt; node-&gt;data &lt;&lt; &#8221; &#8220;;<\/span><\/p>\n<p><span style=\"font-weight: 400\">Inorder(node-&gt;right);<\/span><\/p>\n<p><span style=\"font-weight: 400\">}<\/span><\/p>\n<p><span style=\"font-weight: 400\">int main()<\/span><\/p>\n<p><span style=\"font-weight: 400\">{<\/span><\/p>\n<p><span style=\"font-weight: 400\">struct Node* root = new Node(1);<\/span><\/p>\n<p><span style=\"font-weight: 400\">root-&gt;left = new Node(2);<\/span><\/p>\n<p><span style=\"font-weight: 400\">root-&gt;right = new Node(3);<\/span><\/p>\n<p><span style=\"font-weight: 400\">root-&gt;left-&gt;left = new Node(4);<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u00a0\u00a0\u00a0\u00a0<\/span><\/p>\n<p><span style=\"font-weight: 400\">Inorder(root);<\/span><\/p>\n<p><span style=\"font-weight: 400\">return 0;<\/span><\/p>\n<p><span style=\"font-weight: 400\">}<\/span><\/p>\n\t\t\t\t\t<\/div>\n\t\t\t\t\t<p class=\"wpProQuiz_clear\" style=\"clear:both;\"><\/p>\n\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t<ul class=\"wpProQuiz_questionList\" data-question_id=\"5575\"\n\t\t\t\t\t\tdata-type=\"single\">\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t<li class=\"wpProQuiz_questionListItem\" data-pos=\"0\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span style=\"display:none;\"><\/span>\n\t\t\t\t\t\t\t\t\t\t<label>\n\t\t\t\t\t\t\t\t\t\t\t<input class=\"wpProQuiz_questionInput\" autocomplete=\"off\"\n\t\t\t\t\t\t\t\t\t\t\t\t\ttype=\"radio\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tname=\"question_349_5575\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tvalue=\"1\"> 1 2 4 3\n\t\t\t\t\t\t\t\t\t\t<\/label>\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<\/li>\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t<li class=\"wpProQuiz_questionListItem\" data-pos=\"1\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span style=\"display:none;\"><\/span>\n\t\t\t\t\t\t\t\t\t\t<label>\n\t\t\t\t\t\t\t\t\t\t\t<input class=\"wpProQuiz_questionInput\" autocomplete=\"off\"\n\t\t\t\t\t\t\t\t\t\t\t\t\ttype=\"radio\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tname=\"question_349_5575\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tvalue=\"2\"> 2 1 3 4\t\t\t\t\t\t\t\t\t\t<\/label>\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<\/li>\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t<li class=\"wpProQuiz_questionListItem\" data-pos=\"2\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span style=\"display:none;\"><\/span>\n\t\t\t\t\t\t\t\t\t\t<label>\n\t\t\t\t\t\t\t\t\t\t\t<input class=\"wpProQuiz_questionInput\" autocomplete=\"off\"\n\t\t\t\t\t\t\t\t\t\t\t\t\ttype=\"radio\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tname=\"question_349_5575\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tvalue=\"3\">  4 2 1 3\t\t\t\t\t\t\t\t\t\t<\/label>\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<\/li>\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t<li class=\"wpProQuiz_questionListItem\" data-pos=\"3\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span style=\"display:none;\"><\/span>\n\t\t\t\t\t\t\t\t\t\t<label>\n\t\t\t\t\t\t\t\t\t\t\t<input class=\"wpProQuiz_questionInput\" autocomplete=\"off\"\n\t\t\t\t\t\t\t\t\t\t\t\t\ttype=\"radio\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tname=\"question_349_5575\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tvalue=\"4\">  4 2 3 1\t\t\t\t\t\t\t\t\t\t<\/label>\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<\/li>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<\/ul>\n\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t\t\t\t\t\t<div class=\"wpProQuiz_response\" style=\"display: none;\">\n\t\t\t\t\t\t<div style=\"display: none;\" class=\"wpProQuiz_correct\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span>\n\t\t\t\t\t\t\t\tCorrect\t\t\t\t\t\t\t\t<\/span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"wpProQuiz_AnswerMessage\"><\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t\t\t<div style=\"display: none;\" class=\"wpProQuiz_incorrect\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span>\n\t\t\t\t\t\t\t\tIncorrect\t\t\t\t\t\t\t<\/span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"wpProQuiz_AnswerMessage\"><\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\t\t\t\t<input type=\"button\" name=\"skip\" value=\"Skip question\" class=\"wpProQuiz_button wpProQuiz_QuestionButton\" style=\"float: left; margin-right: 10px ;\"> \t\t\t\t\t\t\t\t\t\t\t\t<input type=\"button\" name=\"back\" value=\"Back\" class=\"wpProQuiz_button wpProQuiz_QuestionButton\" style=\"float: left ; margin-right: 10px ; display: none;\"> \t\t\t\t\t\t\t\t\t\t\t\t<input type=\"button\" name=\"check\" value=\"Check\" class=\"wpProQuiz_button wpProQuiz_QuestionButton\" style=\"float: right ; margin-right: 10px ; display: none;\"> \t\t\t\t\t\t\t\t<input type=\"button\" name=\"next\" value=\"Next\" class=\"wpProQuiz_button wpProQuiz_QuestionButton\" style=\"float: right; display: none;\"> \t\t\t\t\t\t\t\t<div style=\"clear: both;\"><\/div>\n\n\t\t\t\t\t\t\t<\/li>\n\n\t\t\t\t\t<li class=\"wpProQuiz_listItem\" style=\"display: none;\" data-type=\"single\" data-question-meta=\"{&quot;type&quot;:&quot;single&quot;,&quot;question_pro_id&quot;:5576,&quot;question_post_id&quot;:99185}\">\n\t\t\t\t<div class=\"wpProQuiz_question_page\" style=\"display:none;\" >\n\t\t\t\tQuestion <span>6<\/span> of <span>15<\/span>\t\t\t\t<\/div>\n\t\t\t\t<h5 style=\"display: inline-block;\" class=\"wpProQuiz_header\">\n\t\t\t\t\t<span>6<\/span>. Question\n\t\t\t\t<\/h5>\n\n\t\t\t\t\n\t\t\t\t\t\t\t\t<div class=\"wpProQuiz_question\" style=\"margin: 10px 0px 0px 0px;\">\n\t\t\t\t\t<div class=\"wpProQuiz_question_text\">\n\t\t\t\t\t\t<p><span style=\"font-weight: 400\">#include &lt;bits\/stdc++.h&gt;<\/span><\/p>\n<p><span style=\"font-weight: 400\">using namespace std;<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u00a0<\/span><\/p>\n<p><span style=\"font-weight: 400\">struct Node {<\/span><\/p>\n<p><span style=\"font-weight: 400\">int data;<\/span><\/p>\n<p><span style=\"font-weight: 400\">struct Node* left;<\/span><\/p>\n<p><span style=\"font-weight: 400\">struct Node* right;<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u00a0<\/span><\/p>\n<p><span style=\"font-weight: 400\">Node(int val)<\/span><\/p>\n<p><span style=\"font-weight: 400\">{<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u00a0\u00a0\u00a0\u00a0<\/span> <span style=\"font-weight: 400\">data = val;<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u00a0\u00a0\u00a0\u00a0<\/span> <span style=\"font-weight: 400\">left = NULL;<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u00a0\u00a0\u00a0\u00a0<\/span> <span style=\"font-weight: 400\">right = NULL;<\/span><\/p>\n<p><span style=\"font-weight: 400\">}<\/span><\/p>\n<p><span style=\"font-weight: 400\">};<\/span><\/p>\n<p><span style=\"font-weight: 400\">int find(Node *root, int n)<\/span><\/p>\n<p><span style=\"font-weight: 400\">{<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u00a0\u00a0\u00a0\u00a0<\/span><\/p>\n<p><span style=\"font-weight: 400\">if (root-&gt;data == n)<\/span><\/p>\n<p><span style=\"font-weight: 400\">return 1;<\/span><\/p>\n<p><span style=\"font-weight: 400\">else if(root-&gt;left)<\/span><\/p>\n<p><span style=\"font-weight: 400\">find(root-&gt;left, n);<\/span><\/p>\n<p><span style=\"font-weight: 400\">else if(root-&gt;right)<\/span><\/p>\n<p><span style=\"font-weight: 400\">find(root-&gt;right, n);<\/span><\/p>\n<p><span style=\"font-weight: 400\">else<\/span><\/p>\n<p><span style=\"font-weight: 400\">return 0;<\/span><\/p>\n<p><span style=\"font-weight: 400\">}<\/span><\/p>\n<p><span style=\"font-weight: 400\">int main()<\/span><\/p>\n<p><span style=\"font-weight: 400\">{<\/span><\/p>\n<p><span style=\"font-weight: 400\">struct Node* root = new Node(13);<\/span><\/p>\n<p><span style=\"font-weight: 400\">root-&gt;left = new Node(8);<\/span><\/p>\n<p><span style=\"font-weight: 400\">root-&gt;right = new Node(6);<\/span><\/p>\n<p><span style=\"font-weight: 400\">root-&gt;left-&gt;right = new Node(7);<\/span><\/p>\n<p><span style=\"font-weight: 400\">int k=find(root, 18);<\/span><\/p>\n<p><span style=\"font-weight: 400\">if(k==1)<\/span><\/p>\n<p><span style=\"font-weight: 400\">{<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u00a0\u00a0\u00a0\u00a0<\/span> <span style=\"font-weight: 400\">cout&lt;&lt;&#8220;found&#8221;;<\/span><\/p>\n<p><span style=\"font-weight: 400\">}<\/span><\/p>\n<p><span style=\"font-weight: 400\">else<\/span><\/p>\n<p><span style=\"font-weight: 400\">cout&lt;&lt;&#8220;not found&#8221;;<\/span><\/p>\n<p><span style=\"font-weight: 400\">return 0;<\/span><\/p>\n<p><span style=\"font-weight: 400\">}<\/span><\/p>\n<p>\u00a0<\/p>\n\t\t\t\t\t<\/div>\n\t\t\t\t\t<p class=\"wpProQuiz_clear\" style=\"clear:both;\"><\/p>\n\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t<ul class=\"wpProQuiz_questionList\" data-question_id=\"5576\"\n\t\t\t\t\t\tdata-type=\"single\">\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t<li class=\"wpProQuiz_questionListItem\" data-pos=\"0\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span style=\"display:none;\"><\/span>\n\t\t\t\t\t\t\t\t\t\t<label>\n\t\t\t\t\t\t\t\t\t\t\t<input class=\"wpProQuiz_questionInput\" autocomplete=\"off\"\n\t\t\t\t\t\t\t\t\t\t\t\t\ttype=\"radio\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tname=\"question_349_5576\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tvalue=\"1\"> found\n\n\t\t\t\t\t\t\t\t\t\t<\/label>\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<\/li>\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t<li class=\"wpProQuiz_questionListItem\" data-pos=\"1\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span style=\"display:none;\"><\/span>\n\t\t\t\t\t\t\t\t\t\t<label>\n\t\t\t\t\t\t\t\t\t\t\t<input class=\"wpProQuiz_questionInput\" autocomplete=\"off\"\n\t\t\t\t\t\t\t\t\t\t\t\t\ttype=\"radio\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tname=\"question_349_5576\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tvalue=\"2\"> not found\t\t\t\t\t\t\t\t\t\t<\/label>\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<\/li>\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t<li class=\"wpProQuiz_questionListItem\" data-pos=\"2\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span style=\"display:none;\"><\/span>\n\t\t\t\t\t\t\t\t\t\t<label>\n\t\t\t\t\t\t\t\t\t\t\t<input class=\"wpProQuiz_questionInput\" autocomplete=\"off\"\n\t\t\t\t\t\t\t\t\t\t\t\t\ttype=\"radio\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tname=\"question_349_5576\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tvalue=\"3\"> \t\t\t\t\t\t\t\t\t\t<\/label>\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<\/li>\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t<li class=\"wpProQuiz_questionListItem\" data-pos=\"3\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span style=\"display:none;\"><\/span>\n\t\t\t\t\t\t\t\t\t\t<label>\n\t\t\t\t\t\t\t\t\t\t\t<input class=\"wpProQuiz_questionInput\" autocomplete=\"off\"\n\t\t\t\t\t\t\t\t\t\t\t\t\ttype=\"radio\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tname=\"question_349_5576\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tvalue=\"4\"> 1\t\t\t\t\t\t\t\t\t\t<\/label>\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<\/li>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<\/ul>\n\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t\t\t\t\t\t<div class=\"wpProQuiz_response\" style=\"display: none;\">\n\t\t\t\t\t\t<div style=\"display: none;\" class=\"wpProQuiz_correct\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span>\n\t\t\t\t\t\t\t\tCorrect\t\t\t\t\t\t\t\t<\/span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"wpProQuiz_AnswerMessage\"><\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t\t\t<div style=\"display: none;\" class=\"wpProQuiz_incorrect\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span>\n\t\t\t\t\t\t\t\tIncorrect\t\t\t\t\t\t\t<\/span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"wpProQuiz_AnswerMessage\"><\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\t\t\t\t<input type=\"button\" name=\"skip\" value=\"Skip question\" class=\"wpProQuiz_button wpProQuiz_QuestionButton\" style=\"float: left; margin-right: 10px ;\"> \t\t\t\t\t\t\t\t\t\t\t\t<input type=\"button\" name=\"back\" value=\"Back\" class=\"wpProQuiz_button wpProQuiz_QuestionButton\" style=\"float: left ; margin-right: 10px ; display: none;\"> \t\t\t\t\t\t\t\t\t\t\t\t<input type=\"button\" name=\"check\" value=\"Check\" class=\"wpProQuiz_button wpProQuiz_QuestionButton\" style=\"float: right ; margin-right: 10px ; display: none;\"> \t\t\t\t\t\t\t\t<input type=\"button\" name=\"next\" value=\"Next\" class=\"wpProQuiz_button wpProQuiz_QuestionButton\" style=\"float: right; display: none;\"> \t\t\t\t\t\t\t\t<div style=\"clear: both;\"><\/div>\n\n\t\t\t\t\t\t\t<\/li>\n\n\t\t\t\t\t<li class=\"wpProQuiz_listItem\" style=\"display: none;\" data-type=\"single\" data-question-meta=\"{&quot;type&quot;:&quot;single&quot;,&quot;question_pro_id&quot;:5577,&quot;question_post_id&quot;:99186}\">\n\t\t\t\t<div class=\"wpProQuiz_question_page\" style=\"display:none;\" >\n\t\t\t\tQuestion <span>7<\/span> of <span>15<\/span>\t\t\t\t<\/div>\n\t\t\t\t<h5 style=\"display: inline-block;\" class=\"wpProQuiz_header\">\n\t\t\t\t\t<span>7<\/span>. Question\n\t\t\t\t<\/h5>\n\n\t\t\t\t\n\t\t\t\t\t\t\t\t<div class=\"wpProQuiz_question\" style=\"margin: 10px 0px 0px 0px;\">\n\t\t\t\t\t<div class=\"wpProQuiz_question_text\">\n\t\t\t\t\t\t<p><span style=\"font-weight: 400\">#include &lt;bits\/stdc++.h&gt;<\/span><\/p>\n<p><span style=\"font-weight: 400\">using namespace std;<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u00a0<\/span><\/p>\n<p><span style=\"font-weight: 400\">struct Node {<\/span><\/p>\n<p><span style=\"font-weight: 400\">int data;<\/span><\/p>\n<p><span style=\"font-weight: 400\">struct Node* left;<\/span><\/p>\n<p><span style=\"font-weight: 400\">struct Node* right;<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u00a0<\/span><\/p>\n<p><span style=\"font-weight: 400\">Node(int val)<\/span><\/p>\n<p><span style=\"font-weight: 400\">{<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u00a0\u00a0\u00a0\u00a0<\/span> <span style=\"font-weight: 400\">data = val;<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u00a0\u00a0\u00a0\u00a0<\/span> <span style=\"font-weight: 400\">left = NULL;<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u00a0\u00a0\u00a0\u00a0<\/span> <span style=\"font-weight: 400\">right = NULL;<\/span><\/p>\n<p><span style=\"font-weight: 400\">}<\/span><\/p>\n<p><span style=\"font-weight: 400\">};<\/span><\/p>\n<p><span style=\"font-weight: 400\">void insertafter(Node *root, int n)<\/span><\/p>\n<p><span style=\"font-weight: 400\">{<\/span><\/p>\n<p><span style=\"font-weight: 400\">if (root-&gt;left==NULL)<\/span><\/p>\n<p><span style=\"font-weight: 400\">root-&gt;left= new Node(18);<\/span><\/p>\n<p><span style=\"font-weight: 400\">else if(root-&gt;right==NULL)<\/span><\/p>\n<p><span style=\"font-weight: 400\">root-&gt;right= new Node(18);<\/span><\/p>\n<p><span style=\"font-weight: 400\">else<\/span><\/p>\n<p><span style=\"font-weight: 400\">return;<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u00a0\u00a0\u00a0\u00a0<\/span><\/p>\n<p><span style=\"font-weight: 400\">cout&lt;&lt;root-&gt;left-&gt;data;<\/span><\/p>\n<p><span style=\"font-weight: 400\">}<\/span><\/p>\n<p><span style=\"font-weight: 400\">int main()<\/span><\/p>\n<p><span style=\"font-weight: 400\">{<\/span><\/p>\n<p><span style=\"font-weight: 400\">struct Node* root = new Node(13);<\/span><\/p>\n<p><span style=\"font-weight: 400\">root-&gt;left = new Node(8);<\/span><\/p>\n<p><span style=\"font-weight: 400\">root-&gt;right = new Node(6);<\/span><\/p>\n<p><span style=\"font-weight: 400\">root-&gt;left-&gt;right = new Node(7);<\/span><\/p>\n<p><span style=\"font-weight: 400\">insertafter(root-&gt;left, 18);<\/span><\/p>\n<p><span style=\"font-weight: 400\">return 0;<\/span><\/p>\n<p><span style=\"font-weight: 400\">}<\/span><\/p>\n\t\t\t\t\t<\/div>\n\t\t\t\t\t<p class=\"wpProQuiz_clear\" style=\"clear:both;\"><\/p>\n\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t<ul class=\"wpProQuiz_questionList\" data-question_id=\"5577\"\n\t\t\t\t\t\tdata-type=\"single\">\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t<li class=\"wpProQuiz_questionListItem\" data-pos=\"0\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span style=\"display:none;\"><\/span>\n\t\t\t\t\t\t\t\t\t\t<label>\n\t\t\t\t\t\t\t\t\t\t\t<input class=\"wpProQuiz_questionInput\" autocomplete=\"off\"\n\t\t\t\t\t\t\t\t\t\t\t\t\ttype=\"radio\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tname=\"question_349_5577\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tvalue=\"1\"> 8\n\t\t\t\t\t\t\t\t\t\t<\/label>\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<\/li>\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t<li class=\"wpProQuiz_questionListItem\" data-pos=\"1\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span style=\"display:none;\"><\/span>\n\t\t\t\t\t\t\t\t\t\t<label>\n\t\t\t\t\t\t\t\t\t\t\t<input class=\"wpProQuiz_questionInput\" autocomplete=\"off\"\n\t\t\t\t\t\t\t\t\t\t\t\t\ttype=\"radio\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tname=\"question_349_5577\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tvalue=\"2\"> 6\t\t\t\t\t\t\t\t\t\t<\/label>\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<\/li>\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t<li class=\"wpProQuiz_questionListItem\" data-pos=\"2\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span style=\"display:none;\"><\/span>\n\t\t\t\t\t\t\t\t\t\t<label>\n\t\t\t\t\t\t\t\t\t\t\t<input class=\"wpProQuiz_questionInput\" autocomplete=\"off\"\n\t\t\t\t\t\t\t\t\t\t\t\t\ttype=\"radio\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tname=\"question_349_5577\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tvalue=\"3\"> 18\t\t\t\t\t\t\t\t\t\t<\/label>\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<\/li>\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t<li class=\"wpProQuiz_questionListItem\" data-pos=\"3\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span style=\"display:none;\"><\/span>\n\t\t\t\t\t\t\t\t\t\t<label>\n\t\t\t\t\t\t\t\t\t\t\t<input class=\"wpProQuiz_questionInput\" autocomplete=\"off\"\n\t\t\t\t\t\t\t\t\t\t\t\t\ttype=\"radio\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tname=\"question_349_5577\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tvalue=\"4\"> 7\t\t\t\t\t\t\t\t\t\t<\/label>\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<\/li>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<\/ul>\n\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t\t\t\t\t\t<div class=\"wpProQuiz_response\" style=\"display: none;\">\n\t\t\t\t\t\t<div style=\"display: none;\" class=\"wpProQuiz_correct\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span>\n\t\t\t\t\t\t\t\tCorrect\t\t\t\t\t\t\t\t<\/span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"wpProQuiz_AnswerMessage\"><\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t\t\t<div style=\"display: none;\" class=\"wpProQuiz_incorrect\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span>\n\t\t\t\t\t\t\t\tIncorrect\t\t\t\t\t\t\t<\/span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"wpProQuiz_AnswerMessage\"><\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\t\t\t\t<input type=\"button\" name=\"skip\" value=\"Skip question\" class=\"wpProQuiz_button wpProQuiz_QuestionButton\" style=\"float: left; margin-right: 10px ;\"> \t\t\t\t\t\t\t\t\t\t\t\t<input type=\"button\" name=\"back\" value=\"Back\" class=\"wpProQuiz_button wpProQuiz_QuestionButton\" style=\"float: left ; margin-right: 10px ; display: none;\"> \t\t\t\t\t\t\t\t\t\t\t\t<input type=\"button\" name=\"check\" value=\"Check\" class=\"wpProQuiz_button wpProQuiz_QuestionButton\" style=\"float: right ; margin-right: 10px ; display: none;\"> \t\t\t\t\t\t\t\t<input type=\"button\" name=\"next\" value=\"Next\" class=\"wpProQuiz_button wpProQuiz_QuestionButton\" style=\"float: right; display: none;\"> \t\t\t\t\t\t\t\t<div style=\"clear: both;\"><\/div>\n\n\t\t\t\t\t\t\t<\/li>\n\n\t\t\t\t\t<li class=\"wpProQuiz_listItem\" style=\"display: none;\" data-type=\"single\" data-question-meta=\"{&quot;type&quot;:&quot;single&quot;,&quot;question_pro_id&quot;:5578,&quot;question_post_id&quot;:99187}\">\n\t\t\t\t<div class=\"wpProQuiz_question_page\" style=\"display:none;\" >\n\t\t\t\tQuestion <span>8<\/span> of <span>15<\/span>\t\t\t\t<\/div>\n\t\t\t\t<h5 style=\"display: inline-block;\" class=\"wpProQuiz_header\">\n\t\t\t\t\t<span>8<\/span>. Question\n\t\t\t\t<\/h5>\n\n\t\t\t\t\n\t\t\t\t\t\t\t\t<div class=\"wpProQuiz_question\" style=\"margin: 10px 0px 0px 0px;\">\n\t\t\t\t\t<div class=\"wpProQuiz_question_text\">\n\t\t\t\t\t\t<p><span style=\"font-weight: 400\">#include &lt;bits\/stdc++.h&gt;<\/span><\/p>\n<p><span style=\"font-weight: 400\">using namespace std;<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u00a0<\/span><\/p>\n<p><span style=\"font-weight: 400\">struct Node {<\/span><\/p>\n<p><span style=\"font-weight: 400\">int data;<\/span><\/p>\n<p><span style=\"font-weight: 400\">struct Node* left;<\/span><\/p>\n<p><span style=\"font-weight: 400\">struct Node* right;<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u00a0<\/span><\/p>\n<p><span style=\"font-weight: 400\">Node(int val)<\/span><\/p>\n<p><span style=\"font-weight: 400\">{<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u00a0\u00a0\u00a0\u00a0<\/span> <span style=\"font-weight: 400\">data = val;<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u00a0\u00a0\u00a0\u00a0<\/span> <span style=\"font-weight: 400\">left = NULL;<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u00a0\u00a0\u00a0\u00a0<\/span> <span style=\"font-weight: 400\">right = NULL;<\/span><\/p>\n<p><span style=\"font-weight: 400\">}<\/span><\/p>\n<p><span style=\"font-weight: 400\">};<\/span><\/p>\n<p><span style=\"font-weight: 400\">void Delete(Node *root)<\/span><\/p>\n<p><span style=\"font-weight: 400\">{<\/span><\/p>\n<p><span style=\"font-weight: 400\">if (root-&gt;left)<\/span><\/p>\n<p><span style=\"font-weight: 400\">Delete(root-&gt;left);<\/span><\/p>\n<p><span style=\"font-weight: 400\">else if(root-&gt;right)<\/span><\/p>\n<p><span style=\"font-weight: 400\">Delete(root-&gt;right);<\/span><\/p>\n<p><span style=\"font-weight: 400\">else<\/span><\/p>\n<p><span style=\"font-weight: 400\">free(root);<\/span><\/p>\n<p><span style=\"font-weight: 400\">}<\/span><\/p>\n<p><span style=\"font-weight: 400\">void postorder(struct Node* node)<\/span><\/p>\n<p><span style=\"font-weight: 400\">{<\/span><\/p>\n<p><span style=\"font-weight: 400\">if (node == NULL)<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u00a0\u00a0\u00a0\u00a0<\/span> <span style=\"font-weight: 400\">return;<\/span><\/p>\n<p><span style=\"font-weight: 400\">postorder(node-&gt;left);<\/span><\/p>\n<p><span style=\"font-weight: 400\">postorder(node-&gt;right);<\/span><\/p>\n<p><span style=\"font-weight: 400\">cout &lt;&lt; node-&gt;data &lt;&lt; &#8221; &#8220;;<\/span><\/p>\n<p><span style=\"font-weight: 400\">}<\/span><\/p>\n<p>\u00a0<\/p>\n<p><span style=\"font-weight: 400\">int main()<\/span><\/p>\n<p><span style=\"font-weight: 400\">{<\/span><\/p>\n<p><span style=\"font-weight: 400\">struct Node* root = new Node(13);<\/span><\/p>\n<p><span style=\"font-weight: 400\">root-&gt;left = new Node(8);<\/span><\/p>\n<p><span style=\"font-weight: 400\">root-&gt;right = new Node(6);<\/span><\/p>\n<p><span style=\"font-weight: 400\">root-&gt;left-&gt;right = new Node(7);<\/span><\/p>\n<p><span style=\"font-weight: 400\">Delete(root-&gt;left);<\/span><\/p>\n<p><span style=\"font-weight: 400\">postorder(root);<\/span><\/p>\n<p><span style=\"font-weight: 400\">return 0;<\/span><\/p>\n<p><span style=\"font-weight: 400\">}<\/span><\/p>\n\t\t\t\t\t<\/div>\n\t\t\t\t\t<p class=\"wpProQuiz_clear\" style=\"clear:both;\"><\/p>\n\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t<ul class=\"wpProQuiz_questionList\" data-question_id=\"5578\"\n\t\t\t\t\t\tdata-type=\"single\">\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t<li class=\"wpProQuiz_questionListItem\" data-pos=\"0\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span style=\"display:none;\"><\/span>\n\t\t\t\t\t\t\t\t\t\t<label>\n\t\t\t\t\t\t\t\t\t\t\t<input class=\"wpProQuiz_questionInput\" autocomplete=\"off\"\n\t\t\t\t\t\t\t\t\t\t\t\t\ttype=\"radio\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tname=\"question_349_5578\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tvalue=\"1\"> 7 8 6 3\n\t\t\t\t\t\t\t\t\t\t<\/label>\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<\/li>\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t<li class=\"wpProQuiz_questionListItem\" data-pos=\"1\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span style=\"display:none;\"><\/span>\n\t\t\t\t\t\t\t\t\t\t<label>\n\t\t\t\t\t\t\t\t\t\t\t<input class=\"wpProQuiz_questionInput\" autocomplete=\"off\"\n\t\t\t\t\t\t\t\t\t\t\t\t\ttype=\"radio\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tname=\"question_349_5578\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tvalue=\"2\">  0 8 6 3\t\t\t\t\t\t\t\t\t\t<\/label>\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<\/li>\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t<li class=\"wpProQuiz_questionListItem\" data-pos=\"2\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span style=\"display:none;\"><\/span>\n\t\t\t\t\t\t\t\t\t\t<label>\n\t\t\t\t\t\t\t\t\t\t\t<input class=\"wpProQuiz_questionInput\" autocomplete=\"off\"\n\t\t\t\t\t\t\t\t\t\t\t\t\ttype=\"radio\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tname=\"question_349_5578\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tvalue=\"3\">  8 6 3\t\t\t\t\t\t\t\t\t\t<\/label>\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<\/li>\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t<li class=\"wpProQuiz_questionListItem\" data-pos=\"3\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span style=\"display:none;\"><\/span>\n\t\t\t\t\t\t\t\t\t\t<label>\n\t\t\t\t\t\t\t\t\t\t\t<input class=\"wpProQuiz_questionInput\" autocomplete=\"off\"\n\t\t\t\t\t\t\t\t\t\t\t\t\ttype=\"radio\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tname=\"question_349_5578\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tvalue=\"4\"> 7 6 3\t\t\t\t\t\t\t\t\t\t<\/label>\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<\/li>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<\/ul>\n\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t\t\t\t\t\t<div class=\"wpProQuiz_response\" style=\"display: none;\">\n\t\t\t\t\t\t<div style=\"display: none;\" class=\"wpProQuiz_correct\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span>\n\t\t\t\t\t\t\t\tCorrect\t\t\t\t\t\t\t\t<\/span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"wpProQuiz_AnswerMessage\"><\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t\t\t<div style=\"display: none;\" class=\"wpProQuiz_incorrect\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span>\n\t\t\t\t\t\t\t\tIncorrect\t\t\t\t\t\t\t<\/span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"wpProQuiz_AnswerMessage\"><\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\t\t\t\t<input type=\"button\" name=\"skip\" value=\"Skip question\" class=\"wpProQuiz_button wpProQuiz_QuestionButton\" style=\"float: left; margin-right: 10px ;\"> \t\t\t\t\t\t\t\t\t\t\t\t<input type=\"button\" name=\"back\" value=\"Back\" class=\"wpProQuiz_button wpProQuiz_QuestionButton\" style=\"float: left ; margin-right: 10px ; display: none;\"> \t\t\t\t\t\t\t\t\t\t\t\t<input type=\"button\" name=\"check\" value=\"Check\" class=\"wpProQuiz_button wpProQuiz_QuestionButton\" style=\"float: right ; margin-right: 10px ; display: none;\"> \t\t\t\t\t\t\t\t<input type=\"button\" name=\"next\" value=\"Next\" class=\"wpProQuiz_button wpProQuiz_QuestionButton\" style=\"float: right; display: none;\"> \t\t\t\t\t\t\t\t<div style=\"clear: both;\"><\/div>\n\n\t\t\t\t\t\t\t<\/li>\n\n\t\t\t\t\t<li class=\"wpProQuiz_listItem\" style=\"display: none;\" data-type=\"single\" data-question-meta=\"{&quot;type&quot;:&quot;single&quot;,&quot;question_pro_id&quot;:5579,&quot;question_post_id&quot;:99188}\">\n\t\t\t\t<div class=\"wpProQuiz_question_page\" style=\"display:none;\" >\n\t\t\t\tQuestion <span>9<\/span> of <span>15<\/span>\t\t\t\t<\/div>\n\t\t\t\t<h5 style=\"display: inline-block;\" class=\"wpProQuiz_header\">\n\t\t\t\t\t<span>9<\/span>. Question\n\t\t\t\t<\/h5>\n\n\t\t\t\t\n\t\t\t\t\t\t\t\t<div class=\"wpProQuiz_question\" style=\"margin: 10px 0px 0px 0px;\">\n\t\t\t\t\t<div class=\"wpProQuiz_question_text\">\n\t\t\t\t\t\t<p><span style=\"font-weight: 400\">#include &lt;bits\/stdc++.h&gt;<\/span><\/p>\n<p><span style=\"font-weight: 400\">using namespace std;<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u00a0<\/span><\/p>\n<p><span style=\"font-weight: 400\">struct Node {<\/span><\/p>\n<p><span style=\"font-weight: 400\">int data;<\/span><\/p>\n<p><span style=\"font-weight: 400\">struct Node* left;<\/span><\/p>\n<p><span style=\"font-weight: 400\">struct Node* right;<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u00a0<\/span><\/p>\n<p><span style=\"font-weight: 400\">Node(int val)<\/span><\/p>\n<p><span style=\"font-weight: 400\">{<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u00a0\u00a0\u00a0\u00a0<\/span> <span style=\"font-weight: 400\">data = val;<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u00a0\u00a0\u00a0\u00a0<\/span> <span style=\"font-weight: 400\">left = NULL;<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u00a0\u00a0\u00a0\u00a0<\/span> <span style=\"font-weight: 400\">right = NULL;<\/span><\/p>\n<p><span style=\"font-weight: 400\">}<\/span><\/p>\n<p><span style=\"font-weight: 400\">};<\/span><\/p>\n<p><span style=\"font-weight: 400\">void postorder(struct Node* node)<\/span><\/p>\n<p><span style=\"font-weight: 400\">{<\/span><\/p>\n<p><span style=\"font-weight: 400\">if (node == NULL)<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u00a0\u00a0\u00a0\u00a0<\/span> <span style=\"font-weight: 400\">return;<\/span><\/p>\n<p><span style=\"font-weight: 400\">postorder(node-&gt;left);<\/span><\/p>\n<p><span style=\"font-weight: 400\">postorder(node-&gt;right);<\/span><\/p>\n<p><span style=\"font-weight: 400\">cout &lt;&lt; node-&gt;data &lt;&lt; &#8221; &#8220;;<\/span><\/p>\n<p><span style=\"font-weight: 400\">}<\/span><\/p>\n<p><span style=\"font-weight: 400\">int main()<\/span><\/p>\n<p><span style=\"font-weight: 400\">{<\/span><\/p>\n<p><span style=\"font-weight: 400\">struct Node* root = new Node(13);<\/span><\/p>\n<p><span style=\"font-weight: 400\">root-&gt;left = new Node(8);<\/span><\/p>\n<p><span style=\"font-weight: 400\">root-&gt;right = new Node(6);<\/span><\/p>\n<p><span style=\"font-weight: 400\">root-&gt;left-&gt;right = new Node(7);<\/span><\/p>\n<p><span style=\"font-weight: 400\">root-&gt;left-&gt;right-&gt;right = new Node(4);<\/span><\/p>\n<p><span style=\"font-weight: 400\">root-&gt;right-&gt;left= new Node(9);<\/span><\/p>\n<p><span style=\"font-weight: 400\">postorder(root);<\/span><\/p>\n<p><span style=\"font-weight: 400\">return 0;<\/span><\/p>\n<p><span style=\"font-weight: 400\">}<\/span><\/p>\n\t\t\t\t\t<\/div>\n\t\t\t\t\t<p class=\"wpProQuiz_clear\" style=\"clear:both;\"><\/p>\n\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t<ul class=\"wpProQuiz_questionList\" data-question_id=\"5579\"\n\t\t\t\t\t\tdata-type=\"single\">\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t<li class=\"wpProQuiz_questionListItem\" data-pos=\"0\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span style=\"display:none;\"><\/span>\n\t\t\t\t\t\t\t\t\t\t<label>\n\t\t\t\t\t\t\t\t\t\t\t<input class=\"wpProQuiz_questionInput\" autocomplete=\"off\"\n\t\t\t\t\t\t\t\t\t\t\t\t\ttype=\"radio\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tname=\"question_349_5579\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tvalue=\"1\"> 4 7 8 9 6 13\n\t\t\t\t\t\t\t\t\t\t<\/label>\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<\/li>\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t<li class=\"wpProQuiz_questionListItem\" data-pos=\"1\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span style=\"display:none;\"><\/span>\n\t\t\t\t\t\t\t\t\t\t<label>\n\t\t\t\t\t\t\t\t\t\t\t<input class=\"wpProQuiz_questionInput\" autocomplete=\"off\"\n\t\t\t\t\t\t\t\t\t\t\t\t\ttype=\"radio\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tname=\"question_349_5579\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tvalue=\"2\">  7 8 6 9 13 4\t\t\t\t\t\t\t\t\t\t<\/label>\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<\/li>\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t<li class=\"wpProQuiz_questionListItem\" data-pos=\"2\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span style=\"display:none;\"><\/span>\n\t\t\t\t\t\t\t\t\t\t<label>\n\t\t\t\t\t\t\t\t\t\t\t<input class=\"wpProQuiz_questionInput\" autocomplete=\"off\"\n\t\t\t\t\t\t\t\t\t\t\t\t\ttype=\"radio\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tname=\"question_349_5579\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tvalue=\"3\"> 9 13 4 7 8 6\t\t\t\t\t\t\t\t\t\t<\/label>\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<\/li>\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t<li class=\"wpProQuiz_questionListItem\" data-pos=\"3\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span style=\"display:none;\"><\/span>\n\t\t\t\t\t\t\t\t\t\t<label>\n\t\t\t\t\t\t\t\t\t\t\t<input class=\"wpProQuiz_questionInput\" autocomplete=\"off\"\n\t\t\t\t\t\t\t\t\t\t\t\t\ttype=\"radio\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tname=\"question_349_5579\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tvalue=\"4\"> 4 7 8 9 13 6\t\t\t\t\t\t\t\t\t\t<\/label>\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<\/li>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<\/ul>\n\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t\t\t\t\t\t<div class=\"wpProQuiz_response\" style=\"display: none;\">\n\t\t\t\t\t\t<div style=\"display: none;\" class=\"wpProQuiz_correct\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span>\n\t\t\t\t\t\t\t\tCorrect\t\t\t\t\t\t\t\t<\/span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"wpProQuiz_AnswerMessage\"><\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t\t\t<div style=\"display: none;\" class=\"wpProQuiz_incorrect\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span>\n\t\t\t\t\t\t\t\tIncorrect\t\t\t\t\t\t\t<\/span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"wpProQuiz_AnswerMessage\"><\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\t\t\t\t<input type=\"button\" name=\"skip\" value=\"Skip question\" class=\"wpProQuiz_button wpProQuiz_QuestionButton\" style=\"float: left; margin-right: 10px ;\"> \t\t\t\t\t\t\t\t\t\t\t\t<input type=\"button\" name=\"back\" value=\"Back\" class=\"wpProQuiz_button wpProQuiz_QuestionButton\" style=\"float: left ; margin-right: 10px ; display: none;\"> \t\t\t\t\t\t\t\t\t\t\t\t<input type=\"button\" name=\"check\" value=\"Check\" class=\"wpProQuiz_button wpProQuiz_QuestionButton\" style=\"float: right ; margin-right: 10px ; display: none;\"> \t\t\t\t\t\t\t\t<input type=\"button\" name=\"next\" value=\"Next\" class=\"wpProQuiz_button wpProQuiz_QuestionButton\" style=\"float: right; display: none;\"> \t\t\t\t\t\t\t\t<div style=\"clear: both;\"><\/div>\n\n\t\t\t\t\t\t\t<\/li>\n\n\t\t\t\t\t<li class=\"wpProQuiz_listItem\" style=\"display: none;\" data-type=\"single\" data-question-meta=\"{&quot;type&quot;:&quot;single&quot;,&quot;question_pro_id&quot;:5580,&quot;question_post_id&quot;:99189}\">\n\t\t\t\t<div class=\"wpProQuiz_question_page\" style=\"display:none;\" >\n\t\t\t\tQuestion <span>10<\/span> of <span>15<\/span>\t\t\t\t<\/div>\n\t\t\t\t<h5 style=\"display: inline-block;\" class=\"wpProQuiz_header\">\n\t\t\t\t\t<span>10<\/span>. Question\n\t\t\t\t<\/h5>\n\n\t\t\t\t\n\t\t\t\t\t\t\t\t<div class=\"wpProQuiz_question\" style=\"margin: 10px 0px 0px 0px;\">\n\t\t\t\t\t<div class=\"wpProQuiz_question_text\">\n\t\t\t\t\t\t<p><span style=\"font-weight: 400\">Which among the following is pre order traversal?<\/span><\/p>\n\t\t\t\t\t<\/div>\n\t\t\t\t\t<p class=\"wpProQuiz_clear\" style=\"clear:both;\"><\/p>\n\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t<ul class=\"wpProQuiz_questionList\" data-question_id=\"5580\"\n\t\t\t\t\t\tdata-type=\"single\">\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t<li class=\"wpProQuiz_questionListItem\" data-pos=\"0\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span style=\"display:none;\"><\/span>\n\t\t\t\t\t\t\t\t\t\t<label>\n\t\t\t\t\t\t\t\t\t\t\t<input class=\"wpProQuiz_questionInput\" autocomplete=\"off\"\n\t\t\t\t\t\t\t\t\t\t\t\t\ttype=\"radio\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tname=\"question_349_5580\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tvalue=\"1\"> root-&gt;left, root-&gt;data, root-&gt;right\n\t\t\t\t\t\t\t\t\t\t<\/label>\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<\/li>\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t<li class=\"wpProQuiz_questionListItem\" data-pos=\"1\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span style=\"display:none;\"><\/span>\n\t\t\t\t\t\t\t\t\t\t<label>\n\t\t\t\t\t\t\t\t\t\t\t<input class=\"wpProQuiz_questionInput\" autocomplete=\"off\"\n\t\t\t\t\t\t\t\t\t\t\t\t\ttype=\"radio\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tname=\"question_349_5580\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tvalue=\"2\"> root-&gt;data, root-&gt;left, root-&gt;right\t\t\t\t\t\t\t\t\t\t<\/label>\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<\/li>\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t<li class=\"wpProQuiz_questionListItem\" data-pos=\"2\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span style=\"display:none;\"><\/span>\n\t\t\t\t\t\t\t\t\t\t<label>\n\t\t\t\t\t\t\t\t\t\t\t<input class=\"wpProQuiz_questionInput\" autocomplete=\"off\"\n\t\t\t\t\t\t\t\t\t\t\t\t\ttype=\"radio\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tname=\"question_349_5580\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tvalue=\"3\"> root-&gt;left, root-&gt;right, root-&gt;data\t\t\t\t\t\t\t\t\t\t<\/label>\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<\/li>\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t<li class=\"wpProQuiz_questionListItem\" data-pos=\"3\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span style=\"display:none;\"><\/span>\n\t\t\t\t\t\t\t\t\t\t<label>\n\t\t\t\t\t\t\t\t\t\t\t<input class=\"wpProQuiz_questionInput\" autocomplete=\"off\"\n\t\t\t\t\t\t\t\t\t\t\t\t\ttype=\"radio\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tname=\"question_349_5580\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tvalue=\"4\"> None of the above\t\t\t\t\t\t\t\t\t\t<\/label>\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<\/li>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<\/ul>\n\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t\t\t\t\t\t<div class=\"wpProQuiz_response\" style=\"display: none;\">\n\t\t\t\t\t\t<div style=\"display: none;\" class=\"wpProQuiz_correct\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span>\n\t\t\t\t\t\t\t\tCorrect\t\t\t\t\t\t\t\t<\/span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"wpProQuiz_AnswerMessage\"><\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t\t\t<div style=\"display: none;\" class=\"wpProQuiz_incorrect\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span>\n\t\t\t\t\t\t\t\tIncorrect\t\t\t\t\t\t\t<\/span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"wpProQuiz_AnswerMessage\"><\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\t\t\t\t<input type=\"button\" name=\"skip\" value=\"Skip question\" class=\"wpProQuiz_button wpProQuiz_QuestionButton\" style=\"float: left; margin-right: 10px ;\"> \t\t\t\t\t\t\t\t\t\t\t\t<input type=\"button\" name=\"back\" value=\"Back\" class=\"wpProQuiz_button wpProQuiz_QuestionButton\" style=\"float: left ; margin-right: 10px ; display: none;\"> \t\t\t\t\t\t\t\t\t\t\t\t<input type=\"button\" name=\"check\" value=\"Check\" class=\"wpProQuiz_button wpProQuiz_QuestionButton\" style=\"float: right ; margin-right: 10px ; display: none;\"> \t\t\t\t\t\t\t\t<input type=\"button\" name=\"next\" value=\"Next\" class=\"wpProQuiz_button wpProQuiz_QuestionButton\" style=\"float: right; display: none;\"> \t\t\t\t\t\t\t\t<div style=\"clear: both;\"><\/div>\n\n\t\t\t\t\t\t\t<\/li>\n\n\t\t\t\t\t<li class=\"wpProQuiz_listItem\" style=\"display: none;\" data-type=\"single\" data-question-meta=\"{&quot;type&quot;:&quot;single&quot;,&quot;question_pro_id&quot;:5581,&quot;question_post_id&quot;:99190}\">\n\t\t\t\t<div class=\"wpProQuiz_question_page\" style=\"display:none;\" >\n\t\t\t\tQuestion <span>11<\/span> of <span>15<\/span>\t\t\t\t<\/div>\n\t\t\t\t<h5 style=\"display: inline-block;\" class=\"wpProQuiz_header\">\n\t\t\t\t\t<span>11<\/span>. Question\n\t\t\t\t<\/h5>\n\n\t\t\t\t\n\t\t\t\t\t\t\t\t<div class=\"wpProQuiz_question\" style=\"margin: 10px 0px 0px 0px;\">\n\t\t\t\t\t<div class=\"wpProQuiz_question_text\">\n\t\t\t\t\t\t<p><span style=\"font-weight: 400\">which among the following is post order traversal?<\/span><\/p>\n\t\t\t\t\t<\/div>\n\t\t\t\t\t<p class=\"wpProQuiz_clear\" style=\"clear:both;\"><\/p>\n\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t<ul class=\"wpProQuiz_questionList\" data-question_id=\"5581\"\n\t\t\t\t\t\tdata-type=\"single\">\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t<li class=\"wpProQuiz_questionListItem\" data-pos=\"0\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span style=\"display:none;\"><\/span>\n\t\t\t\t\t\t\t\t\t\t<label>\n\t\t\t\t\t\t\t\t\t\t\t<input class=\"wpProQuiz_questionInput\" autocomplete=\"off\"\n\t\t\t\t\t\t\t\t\t\t\t\t\ttype=\"radio\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tname=\"question_349_5581\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tvalue=\"1\">  root-&gt;left, root-&gt;data, root-&gt;right\n\t\t\t\t\t\t\t\t\t\t<\/label>\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<\/li>\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t<li class=\"wpProQuiz_questionListItem\" data-pos=\"1\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span style=\"display:none;\"><\/span>\n\t\t\t\t\t\t\t\t\t\t<label>\n\t\t\t\t\t\t\t\t\t\t\t<input class=\"wpProQuiz_questionInput\" autocomplete=\"off\"\n\t\t\t\t\t\t\t\t\t\t\t\t\ttype=\"radio\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tname=\"question_349_5581\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tvalue=\"2\">  root-&gt;data, root-&gt;left, root-&gt;right\t\t\t\t\t\t\t\t\t\t<\/label>\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<\/li>\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t<li class=\"wpProQuiz_questionListItem\" data-pos=\"2\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span style=\"display:none;\"><\/span>\n\t\t\t\t\t\t\t\t\t\t<label>\n\t\t\t\t\t\t\t\t\t\t\t<input class=\"wpProQuiz_questionInput\" autocomplete=\"off\"\n\t\t\t\t\t\t\t\t\t\t\t\t\ttype=\"radio\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tname=\"question_349_5581\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tvalue=\"3\"> root-&gt;left, root-&gt;right, root-&gt;data\t\t\t\t\t\t\t\t\t\t<\/label>\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<\/li>\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t<li class=\"wpProQuiz_questionListItem\" data-pos=\"3\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span style=\"display:none;\"><\/span>\n\t\t\t\t\t\t\t\t\t\t<label>\n\t\t\t\t\t\t\t\t\t\t\t<input class=\"wpProQuiz_questionInput\" autocomplete=\"off\"\n\t\t\t\t\t\t\t\t\t\t\t\t\ttype=\"radio\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tname=\"question_349_5581\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tvalue=\"4\"> None of the above\t\t\t\t\t\t\t\t\t\t<\/label>\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<\/li>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<\/ul>\n\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t\t\t\t\t\t<div class=\"wpProQuiz_response\" style=\"display: none;\">\n\t\t\t\t\t\t<div style=\"display: none;\" class=\"wpProQuiz_correct\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span>\n\t\t\t\t\t\t\t\tCorrect\t\t\t\t\t\t\t\t<\/span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"wpProQuiz_AnswerMessage\"><\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t\t\t<div style=\"display: none;\" class=\"wpProQuiz_incorrect\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span>\n\t\t\t\t\t\t\t\tIncorrect\t\t\t\t\t\t\t<\/span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"wpProQuiz_AnswerMessage\"><\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\t\t\t\t<input type=\"button\" name=\"skip\" value=\"Skip question\" class=\"wpProQuiz_button wpProQuiz_QuestionButton\" style=\"float: left; margin-right: 10px ;\"> \t\t\t\t\t\t\t\t\t\t\t\t<input type=\"button\" name=\"back\" value=\"Back\" class=\"wpProQuiz_button wpProQuiz_QuestionButton\" style=\"float: left ; margin-right: 10px ; display: none;\"> \t\t\t\t\t\t\t\t\t\t\t\t<input type=\"button\" name=\"check\" value=\"Check\" class=\"wpProQuiz_button wpProQuiz_QuestionButton\" style=\"float: right ; margin-right: 10px ; display: none;\"> \t\t\t\t\t\t\t\t<input type=\"button\" name=\"next\" value=\"Next\" class=\"wpProQuiz_button wpProQuiz_QuestionButton\" style=\"float: right; display: none;\"> \t\t\t\t\t\t\t\t<div style=\"clear: both;\"><\/div>\n\n\t\t\t\t\t\t\t<\/li>\n\n\t\t\t\t\t<li class=\"wpProQuiz_listItem\" style=\"display: none;\" data-type=\"single\" data-question-meta=\"{&quot;type&quot;:&quot;single&quot;,&quot;question_pro_id&quot;:5582,&quot;question_post_id&quot;:99191}\">\n\t\t\t\t<div class=\"wpProQuiz_question_page\" style=\"display:none;\" >\n\t\t\t\tQuestion <span>12<\/span> of <span>15<\/span>\t\t\t\t<\/div>\n\t\t\t\t<h5 style=\"display: inline-block;\" class=\"wpProQuiz_header\">\n\t\t\t\t\t<span>12<\/span>. Question\n\t\t\t\t<\/h5>\n\n\t\t\t\t\n\t\t\t\t\t\t\t\t<div class=\"wpProQuiz_question\" style=\"margin: 10px 0px 0px 0px;\">\n\t\t\t\t\t<div class=\"wpProQuiz_question_text\">\n\t\t\t\t\t\t<p><span style=\"font-weight: 400\">Which among the following is inorder traversal?<\/span><\/p>\n\t\t\t\t\t<\/div>\n\t\t\t\t\t<p class=\"wpProQuiz_clear\" style=\"clear:both;\"><\/p>\n\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t<ul class=\"wpProQuiz_questionList\" data-question_id=\"5582\"\n\t\t\t\t\t\tdata-type=\"single\">\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t<li class=\"wpProQuiz_questionListItem\" data-pos=\"0\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span style=\"display:none;\"><\/span>\n\t\t\t\t\t\t\t\t\t\t<label>\n\t\t\t\t\t\t\t\t\t\t\t<input class=\"wpProQuiz_questionInput\" autocomplete=\"off\"\n\t\t\t\t\t\t\t\t\t\t\t\t\ttype=\"radio\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tname=\"question_349_5582\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tvalue=\"1\"> root-&gt;left, root-&gt;data, root-&gt;right\n\t\t\t\t\t\t\t\t\t\t<\/label>\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<\/li>\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t<li class=\"wpProQuiz_questionListItem\" data-pos=\"1\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span style=\"display:none;\"><\/span>\n\t\t\t\t\t\t\t\t\t\t<label>\n\t\t\t\t\t\t\t\t\t\t\t<input class=\"wpProQuiz_questionInput\" autocomplete=\"off\"\n\t\t\t\t\t\t\t\t\t\t\t\t\ttype=\"radio\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tname=\"question_349_5582\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tvalue=\"2\">  root-&gt;data, root-&gt;left, root-&gt;right\t\t\t\t\t\t\t\t\t\t<\/label>\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<\/li>\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t<li class=\"wpProQuiz_questionListItem\" data-pos=\"2\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span style=\"display:none;\"><\/span>\n\t\t\t\t\t\t\t\t\t\t<label>\n\t\t\t\t\t\t\t\t\t\t\t<input class=\"wpProQuiz_questionInput\" autocomplete=\"off\"\n\t\t\t\t\t\t\t\t\t\t\t\t\ttype=\"radio\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tname=\"question_349_5582\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tvalue=\"3\"> root-&gt;left, root-&gt;right, root-&gt;data\t\t\t\t\t\t\t\t\t\t<\/label>\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<\/li>\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t<li class=\"wpProQuiz_questionListItem\" data-pos=\"3\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span style=\"display:none;\"><\/span>\n\t\t\t\t\t\t\t\t\t\t<label>\n\t\t\t\t\t\t\t\t\t\t\t<input class=\"wpProQuiz_questionInput\" autocomplete=\"off\"\n\t\t\t\t\t\t\t\t\t\t\t\t\ttype=\"radio\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tname=\"question_349_5582\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tvalue=\"4\">  None of the above\t\t\t\t\t\t\t\t\t\t<\/label>\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<\/li>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<\/ul>\n\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t\t\t\t\t\t<div class=\"wpProQuiz_response\" style=\"display: none;\">\n\t\t\t\t\t\t<div style=\"display: none;\" class=\"wpProQuiz_correct\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span>\n\t\t\t\t\t\t\t\tCorrect\t\t\t\t\t\t\t\t<\/span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"wpProQuiz_AnswerMessage\"><\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t\t\t<div style=\"display: none;\" class=\"wpProQuiz_incorrect\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span>\n\t\t\t\t\t\t\t\tIncorrect\t\t\t\t\t\t\t<\/span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"wpProQuiz_AnswerMessage\"><\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\t\t\t\t<input type=\"button\" name=\"skip\" value=\"Skip question\" class=\"wpProQuiz_button wpProQuiz_QuestionButton\" style=\"float: left; margin-right: 10px ;\"> \t\t\t\t\t\t\t\t\t\t\t\t<input type=\"button\" name=\"back\" value=\"Back\" class=\"wpProQuiz_button wpProQuiz_QuestionButton\" style=\"float: left ; margin-right: 10px ; display: none;\"> \t\t\t\t\t\t\t\t\t\t\t\t<input type=\"button\" name=\"check\" value=\"Check\" class=\"wpProQuiz_button wpProQuiz_QuestionButton\" style=\"float: right ; margin-right: 10px ; display: none;\"> \t\t\t\t\t\t\t\t<input type=\"button\" name=\"next\" value=\"Next\" class=\"wpProQuiz_button wpProQuiz_QuestionButton\" style=\"float: right; display: none;\"> \t\t\t\t\t\t\t\t<div style=\"clear: both;\"><\/div>\n\n\t\t\t\t\t\t\t<\/li>\n\n\t\t\t\t\t<li class=\"wpProQuiz_listItem\" style=\"display: none;\" data-type=\"single\" data-question-meta=\"{&quot;type&quot;:&quot;single&quot;,&quot;question_pro_id&quot;:5583,&quot;question_post_id&quot;:99192}\">\n\t\t\t\t<div class=\"wpProQuiz_question_page\" style=\"display:none;\" >\n\t\t\t\tQuestion <span>13<\/span> of <span>15<\/span>\t\t\t\t<\/div>\n\t\t\t\t<h5 style=\"display: inline-block;\" class=\"wpProQuiz_header\">\n\t\t\t\t\t<span>13<\/span>. Question\n\t\t\t\t<\/h5>\n\n\t\t\t\t\n\t\t\t\t\t\t\t\t<div class=\"wpProQuiz_question\" style=\"margin: 10px 0px 0px 0px;\">\n\t\t\t\t\t<div class=\"wpProQuiz_question_text\">\n\t\t\t\t\t\t<p><span style=\"font-weight: 400\">Which among the following is the property of a full binary tree?<\/span><\/p>\n\t\t\t\t\t<\/div>\n\t\t\t\t\t<p class=\"wpProQuiz_clear\" style=\"clear:both;\"><\/p>\n\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t<ul class=\"wpProQuiz_questionList\" data-question_id=\"5583\"\n\t\t\t\t\t\tdata-type=\"single\">\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t<li class=\"wpProQuiz_questionListItem\" data-pos=\"0\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span style=\"display:none;\"><\/span>\n\t\t\t\t\t\t\t\t\t\t<label>\n\t\t\t\t\t\t\t\t\t\t\t<input class=\"wpProQuiz_questionInput\" autocomplete=\"off\"\n\t\t\t\t\t\t\t\t\t\t\t\t\ttype=\"radio\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tname=\"question_349_5583\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tvalue=\"1\">  Number of children on each node is either 0 or 2\n\t\t\t\t\t\t\t\t\t\t<\/label>\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<\/li>\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t<li class=\"wpProQuiz_questionListItem\" data-pos=\"1\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span style=\"display:none;\"><\/span>\n\t\t\t\t\t\t\t\t\t\t<label>\n\t\t\t\t\t\t\t\t\t\t\t<input class=\"wpProQuiz_questionInput\" autocomplete=\"off\"\n\t\t\t\t\t\t\t\t\t\t\t\t\ttype=\"radio\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tname=\"question_349_5583\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tvalue=\"2\"> Number of children on each node is strictly 2\t\t\t\t\t\t\t\t\t\t<\/label>\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<\/li>\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t<li class=\"wpProQuiz_questionListItem\" data-pos=\"2\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span style=\"display:none;\"><\/span>\n\t\t\t\t\t\t\t\t\t\t<label>\n\t\t\t\t\t\t\t\t\t\t\t<input class=\"wpProQuiz_questionInput\" autocomplete=\"off\"\n\t\t\t\t\t\t\t\t\t\t\t\t\ttype=\"radio\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tname=\"question_349_5583\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tvalue=\"3\">  if all node has single child\t\t\t\t\t\t\t\t\t\t<\/label>\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<\/li>\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t<li class=\"wpProQuiz_questionListItem\" data-pos=\"3\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span style=\"display:none;\"><\/span>\n\t\t\t\t\t\t\t\t\t\t<label>\n\t\t\t\t\t\t\t\t\t\t\t<input class=\"wpProQuiz_questionInput\" autocomplete=\"off\"\n\t\t\t\t\t\t\t\t\t\t\t\t\ttype=\"radio\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tname=\"question_349_5583\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tvalue=\"4\"> None of the above\t\t\t\t\t\t\t\t\t\t<\/label>\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<\/li>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<\/ul>\n\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t\t\t\t\t\t<div class=\"wpProQuiz_response\" style=\"display: none;\">\n\t\t\t\t\t\t<div style=\"display: none;\" class=\"wpProQuiz_correct\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span>\n\t\t\t\t\t\t\t\tCorrect\t\t\t\t\t\t\t\t<\/span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"wpProQuiz_AnswerMessage\"><\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t\t\t<div style=\"display: none;\" class=\"wpProQuiz_incorrect\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span>\n\t\t\t\t\t\t\t\tIncorrect\t\t\t\t\t\t\t<\/span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"wpProQuiz_AnswerMessage\"><\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\t\t\t\t<input type=\"button\" name=\"skip\" value=\"Skip question\" class=\"wpProQuiz_button wpProQuiz_QuestionButton\" style=\"float: left; margin-right: 10px ;\"> \t\t\t\t\t\t\t\t\t\t\t\t<input type=\"button\" name=\"back\" value=\"Back\" class=\"wpProQuiz_button wpProQuiz_QuestionButton\" style=\"float: left ; margin-right: 10px ; display: none;\"> \t\t\t\t\t\t\t\t\t\t\t\t<input type=\"button\" name=\"check\" value=\"Check\" class=\"wpProQuiz_button wpProQuiz_QuestionButton\" style=\"float: right ; margin-right: 10px ; display: none;\"> \t\t\t\t\t\t\t\t<input type=\"button\" name=\"next\" value=\"Next\" class=\"wpProQuiz_button wpProQuiz_QuestionButton\" style=\"float: right; display: none;\"> \t\t\t\t\t\t\t\t<div style=\"clear: both;\"><\/div>\n\n\t\t\t\t\t\t\t<\/li>\n\n\t\t\t\t\t<li class=\"wpProQuiz_listItem\" style=\"display: none;\" data-type=\"single\" data-question-meta=\"{&quot;type&quot;:&quot;single&quot;,&quot;question_pro_id&quot;:5584,&quot;question_post_id&quot;:99193}\">\n\t\t\t\t<div class=\"wpProQuiz_question_page\" style=\"display:none;\" >\n\t\t\t\tQuestion <span>14<\/span> of <span>15<\/span>\t\t\t\t<\/div>\n\t\t\t\t<h5 style=\"display: inline-block;\" class=\"wpProQuiz_header\">\n\t\t\t\t\t<span>14<\/span>. Question\n\t\t\t\t<\/h5>\n\n\t\t\t\t\n\t\t\t\t\t\t\t\t<div class=\"wpProQuiz_question\" style=\"margin: 10px 0px 0px 0px;\">\n\t\t\t\t\t<div class=\"wpProQuiz_question_text\">\n\t\t\t\t\t\t<p><span style=\"font-weight: 400\">Which among the following is the property of a perfect binary tree?<\/span><\/p>\n\t\t\t\t\t<\/div>\n\t\t\t\t\t<p class=\"wpProQuiz_clear\" style=\"clear:both;\"><\/p>\n\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t<ul class=\"wpProQuiz_questionList\" data-question_id=\"5584\"\n\t\t\t\t\t\tdata-type=\"single\">\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t<li class=\"wpProQuiz_questionListItem\" data-pos=\"0\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span style=\"display:none;\"><\/span>\n\t\t\t\t\t\t\t\t\t\t<label>\n\t\t\t\t\t\t\t\t\t\t\t<input class=\"wpProQuiz_questionInput\" autocomplete=\"off\"\n\t\t\t\t\t\t\t\t\t\t\t\t\ttype=\"radio\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tname=\"question_349_5584\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tvalue=\"1\"> Number of children on each node is either 0 or 2\n\t\t\t\t\t\t\t\t\t\t<\/label>\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<\/li>\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t<li class=\"wpProQuiz_questionListItem\" data-pos=\"1\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span style=\"display:none;\"><\/span>\n\t\t\t\t\t\t\t\t\t\t<label>\n\t\t\t\t\t\t\t\t\t\t\t<input class=\"wpProQuiz_questionInput\" autocomplete=\"off\"\n\t\t\t\t\t\t\t\t\t\t\t\t\ttype=\"radio\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tname=\"question_349_5584\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tvalue=\"2\"> Number of children on each node is strictly 2\t\t\t\t\t\t\t\t\t\t<\/label>\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<\/li>\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t<li class=\"wpProQuiz_questionListItem\" data-pos=\"2\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span style=\"display:none;\"><\/span>\n\t\t\t\t\t\t\t\t\t\t<label>\n\t\t\t\t\t\t\t\t\t\t\t<input class=\"wpProQuiz_questionInput\" autocomplete=\"off\"\n\t\t\t\t\t\t\t\t\t\t\t\t\ttype=\"radio\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tname=\"question_349_5584\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tvalue=\"3\">  if all node has single child\t\t\t\t\t\t\t\t\t\t<\/label>\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<\/li>\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t<li class=\"wpProQuiz_questionListItem\" data-pos=\"3\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span style=\"display:none;\"><\/span>\n\t\t\t\t\t\t\t\t\t\t<label>\n\t\t\t\t\t\t\t\t\t\t\t<input class=\"wpProQuiz_questionInput\" autocomplete=\"off\"\n\t\t\t\t\t\t\t\t\t\t\t\t\ttype=\"radio\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tname=\"question_349_5584\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tvalue=\"4\"> None of the above\t\t\t\t\t\t\t\t\t\t<\/label>\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<\/li>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<\/ul>\n\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t\t\t\t\t\t<div class=\"wpProQuiz_response\" style=\"display: none;\">\n\t\t\t\t\t\t<div style=\"display: none;\" class=\"wpProQuiz_correct\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span>\n\t\t\t\t\t\t\t\tCorrect\t\t\t\t\t\t\t\t<\/span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"wpProQuiz_AnswerMessage\"><\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t\t\t<div style=\"display: none;\" class=\"wpProQuiz_incorrect\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span>\n\t\t\t\t\t\t\t\tIncorrect\t\t\t\t\t\t\t<\/span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"wpProQuiz_AnswerMessage\"><\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\t\t\t\t<input type=\"button\" name=\"skip\" value=\"Skip question\" class=\"wpProQuiz_button wpProQuiz_QuestionButton\" style=\"float: left; margin-right: 10px ;\"> \t\t\t\t\t\t\t\t\t\t\t\t<input type=\"button\" name=\"back\" value=\"Back\" class=\"wpProQuiz_button wpProQuiz_QuestionButton\" style=\"float: left ; margin-right: 10px ; display: none;\"> \t\t\t\t\t\t\t\t\t\t\t\t<input type=\"button\" name=\"check\" value=\"Check\" class=\"wpProQuiz_button wpProQuiz_QuestionButton\" style=\"float: right ; margin-right: 10px ; display: none;\"> \t\t\t\t\t\t\t\t<input type=\"button\" name=\"next\" value=\"Next\" class=\"wpProQuiz_button wpProQuiz_QuestionButton\" style=\"float: right; display: none;\"> \t\t\t\t\t\t\t\t<div style=\"clear: both;\"><\/div>\n\n\t\t\t\t\t\t\t<\/li>\n\n\t\t\t\t\t<li class=\"wpProQuiz_listItem\" style=\"display: none;\" data-type=\"single\" data-question-meta=\"{&quot;type&quot;:&quot;single&quot;,&quot;question_pro_id&quot;:5585,&quot;question_post_id&quot;:99194}\">\n\t\t\t\t<div class=\"wpProQuiz_question_page\" style=\"display:none;\" >\n\t\t\t\tQuestion <span>15<\/span> of <span>15<\/span>\t\t\t\t<\/div>\n\t\t\t\t<h5 style=\"display: inline-block;\" class=\"wpProQuiz_header\">\n\t\t\t\t\t<span>15<\/span>. Question\n\t\t\t\t<\/h5>\n\n\t\t\t\t\n\t\t\t\t\t\t\t\t<div class=\"wpProQuiz_question\" style=\"margin: 10px 0px 0px 0px;\">\n\t\t\t\t\t<div class=\"wpProQuiz_question_text\">\n\t\t\t\t\t\t<p>#include &lt;bits\/stdc++.h&gt;<\/p>\n<p>using namespace std;<\/p>\n<p>\u00a0<\/p>\n<p>struct Node {<\/p>\n<p>\u00a0\u00a0\u00a0 int data;<\/p>\n<p>\u00a0\u00a0\u00a0 struct Node* left;<\/p>\n<p>\u00a0\u00a0\u00a0 struct Node* right;<\/p>\n<p>\u00a0<\/p>\n<p>\u00a0\u00a0\u00a0 Node(int val)<\/p>\n<p>\u00a0\u00a0\u00a0 {<\/p>\n<p>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 data = val;<\/p>\n<p>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 left = NULL;<\/p>\n<p>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 right = NULL;<\/p>\n<p>\u00a0\u00a0\u00a0 }<\/p>\n<p>};<\/p>\n<p>\u00a0<\/p>\n<p>void postorder(struct Node* node)<\/p>\n<p>{<\/p>\n<p>\u00a0\u00a0\u00a0 if (node == NULL)<\/p>\n<p>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 return;<\/p>\n<p>\u00a0\u00a0\u00a0 postorder(node-&gt;left);<\/p>\n<p>\u00a0\u00a0\u00a0 postorder(node-&gt;right);<\/p>\n<p>\u00a0\u00a0\u00a0 cout &lt;&lt; node-&gt;data &lt;&lt; &#8221; &#8220;;<\/p>\n<p>}<\/p>\n<p>int main()<\/p>\n<p>{<\/p>\n<p>\u00a0\u00a0\u00a0 struct Node* root = new Node(1);<\/p>\n<p>\u00a0\u00a0\u00a0 root-&gt;left = new Node(2);<\/p>\n<p>\u00a0\u00a0\u00a0 root-&gt;right = new Node(3);<\/p>\n<p>\u00a0\u00a0\u00a0 root-&gt;left-&gt;left = new Node(4);<\/p>\n<p>\u00a0\u00a0\u00a0\u00a0<\/p>\n<p>\u00a0\u00a0\u00a0 postorder(root);<\/p>\n<p>\u00a0\u00a0\u00a0 return 0;<\/p>\n<p>}<\/p>\n\t\t\t\t\t<\/div>\n\t\t\t\t\t<p class=\"wpProQuiz_clear\" style=\"clear:both;\"><\/p>\n\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t<ul class=\"wpProQuiz_questionList\" data-question_id=\"5585\"\n\t\t\t\t\t\tdata-type=\"single\">\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t<li class=\"wpProQuiz_questionListItem\" data-pos=\"0\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span style=\"display:none;\"><\/span>\n\t\t\t\t\t\t\t\t\t\t<label>\n\t\t\t\t\t\t\t\t\t\t\t<input class=\"wpProQuiz_questionInput\" autocomplete=\"off\"\n\t\t\t\t\t\t\t\t\t\t\t\t\ttype=\"radio\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tname=\"question_349_5585\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tvalue=\"1\"> 1 2 4 3\n\t\t\t\t\t\t\t\t\t\t<\/label>\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<\/li>\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t<li class=\"wpProQuiz_questionListItem\" data-pos=\"1\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span style=\"display:none;\"><\/span>\n\t\t\t\t\t\t\t\t\t\t<label>\n\t\t\t\t\t\t\t\t\t\t\t<input class=\"wpProQuiz_questionInput\" autocomplete=\"off\"\n\t\t\t\t\t\t\t\t\t\t\t\t\ttype=\"radio\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tname=\"question_349_5585\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tvalue=\"2\"> 2 1 3 4\t\t\t\t\t\t\t\t\t\t<\/label>\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<\/li>\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t<li class=\"wpProQuiz_questionListItem\" data-pos=\"2\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span style=\"display:none;\"><\/span>\n\t\t\t\t\t\t\t\t\t\t<label>\n\t\t\t\t\t\t\t\t\t\t\t<input class=\"wpProQuiz_questionInput\" autocomplete=\"off\"\n\t\t\t\t\t\t\t\t\t\t\t\t\ttype=\"radio\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tname=\"question_349_5585\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tvalue=\"3\">  4 2 1 3\t\t\t\t\t\t\t\t\t\t<\/label>\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<\/li>\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t<li class=\"wpProQuiz_questionListItem\" data-pos=\"3\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span style=\"display:none;\"><\/span>\n\t\t\t\t\t\t\t\t\t\t<label>\n\t\t\t\t\t\t\t\t\t\t\t<input class=\"wpProQuiz_questionInput\" autocomplete=\"off\"\n\t\t\t\t\t\t\t\t\t\t\t\t\ttype=\"radio\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tname=\"question_349_5585\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tvalue=\"4\"> 4 2 3 1\t\t\t\t\t\t\t\t\t\t<\/label>\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<\/li>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<\/ul>\n\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t\t\t\t\t\t<div class=\"wpProQuiz_response\" style=\"display: none;\">\n\t\t\t\t\t\t<div style=\"display: none;\" class=\"wpProQuiz_correct\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span>\n\t\t\t\t\t\t\t\tCorrect\t\t\t\t\t\t\t\t<\/span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"wpProQuiz_AnswerMessage\"><\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t\t\t<div style=\"display: none;\" class=\"wpProQuiz_incorrect\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span>\n\t\t\t\t\t\t\t\tIncorrect\t\t\t\t\t\t\t<\/span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"wpProQuiz_AnswerMessage\"><\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\t\t\t\t<input type=\"button\" name=\"skip\" value=\"Skip question\" class=\"wpProQuiz_button wpProQuiz_QuestionButton\" style=\"float: left; margin-right: 10px ;\"> \t\t\t\t\t\t\t\t\t\t\t\t<input type=\"button\" name=\"back\" value=\"Back\" class=\"wpProQuiz_button wpProQuiz_QuestionButton\" style=\"float: left ; margin-right: 10px ; display: none;\"> \t\t\t\t\t\t\t\t\t\t\t\t<input type=\"button\" name=\"check\" value=\"Check\" class=\"wpProQuiz_button wpProQuiz_QuestionButton\" style=\"float: right ; margin-right: 10px ; display: none;\"> \t\t\t\t\t\t\t\t<input type=\"button\" name=\"next\" value=\"Next\" class=\"wpProQuiz_button wpProQuiz_QuestionButton\" style=\"float: right; display: none;\"> \t\t\t\t\t\t\t\t<div style=\"clear: both;\"><\/div>\n\n\t\t\t\t\t\t\t<\/li>\n\n\t\t\t<\/ol>\n\t<\/div>\n\t\t<\/div>\n\t\t\n<\/div> <!--\/.learndash-wrapper-->\n<\/div><\/strong><\/p>\n<h2>7. Summary<\/h2>\n<p>In this tutorial, we discussed the basic meaning of trees in C, then we further discussed what are the binary tree and their requirement. We even discussed the two types of binary trees. Lastly, we ended our discussion by learning how to implement a binary tree from the start.<\/p>\n<p><em><strong>You can simplify your long code with <a href=\"https:\/\/data-flair.training\/blogs\/recursion-in-c\/\">Recursive Function in C<\/a><\/strong><\/em><\/p>\n<p>Don&#8217;t forget to comment below!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Binary Tree in C is a non-linear data structure in which the node is linked to two successor nodes, namely root, left and right. Binary trees are a very popular concept in the C&#46;&#46;&#46;<\/p>\n","protected":false},"author":5,"featured_media":59194,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[19488],"tags":[20113,20112,20111,20114],"class_list":["post-59110","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-c-programming","tag-binary-tree-implementation","tag-binary-tree-tutorial","tag-c-binary-tree","tag-declaration-of-binary-tree"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.4 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Binary Tree in C - Explore the Reason behind its Popularity - DataFlair<\/title>\n<meta name=\"description\" content=\"Binary Tree in C is a non-linear data structure, here node is linked to two successor nodes. Let&#039;s discuss implementation, requirement, types of Binary tree\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/data-flair.training\/blogs\/binary-tree-in-c\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Binary Tree in C - Explore the Reason behind its Popularity - DataFlair\" \/>\n<meta property=\"og:description\" content=\"Binary Tree in C is a non-linear data structure, here node is linked to two successor nodes. Let&#039;s discuss implementation, requirement, types of Binary tree\" \/>\n<meta property=\"og:url\" content=\"https:\/\/data-flair.training\/blogs\/binary-tree-in-c\/\" \/>\n<meta property=\"og:site_name\" content=\"DataFlair\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/DataFlairWS\/\" \/>\n<meta property=\"article:published_time\" content=\"2019-06-14T08:46:08+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2021-07-23T07:55:14+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/06\/Binary-tree-in-C.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"802\" \/>\n\t<meta property=\"og:image:height\" content=\"420\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"DataFlair Team\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@DataFlairWS\" \/>\n<meta name=\"twitter:site\" content=\"@DataFlairWS\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"DataFlair Team\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"7 minutes\" \/>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Binary Tree in C - Explore the Reason behind its Popularity - DataFlair","description":"Binary Tree in C is a non-linear data structure, here node is linked to two successor nodes. Let's discuss implementation, requirement, types of Binary tree","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:\/\/data-flair.training\/blogs\/binary-tree-in-c\/","og_locale":"en_US","og_type":"article","og_title":"Binary Tree in C - Explore the Reason behind its Popularity - DataFlair","og_description":"Binary Tree in C is a non-linear data structure, here node is linked to two successor nodes. Let's discuss implementation, requirement, types of Binary tree","og_url":"https:\/\/data-flair.training\/blogs\/binary-tree-in-c\/","og_site_name":"DataFlair","article_publisher":"https:\/\/www.facebook.com\/DataFlairWS\/","article_published_time":"2019-06-14T08:46:08+00:00","article_modified_time":"2021-07-23T07:55:14+00:00","og_image":[{"width":802,"height":420,"url":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/06\/Binary-tree-in-C.jpg","type":"image\/jpeg"}],"author":"DataFlair Team","twitter_card":"summary_large_image","twitter_creator":"@DataFlairWS","twitter_site":"@DataFlairWS","twitter_misc":{"Written by":"DataFlair Team","Est. reading time":"7 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/data-flair.training\/blogs\/binary-tree-in-c\/#article","isPartOf":{"@id":"https:\/\/data-flair.training\/blogs\/binary-tree-in-c\/"},"author":{"name":"DataFlair Team","@id":"https:\/\/data-flair.training\/blogs\/#\/schema\/person\/7f83c342f5d1632d6f7b4b0b0f447823"},"headline":"Binary Tree in C &#8211; Explore the Reason behind its Popularity","datePublished":"2019-06-14T08:46:08+00:00","dateModified":"2021-07-23T07:55:14+00:00","mainEntityOfPage":{"@id":"https:\/\/data-flair.training\/blogs\/binary-tree-in-c\/"},"wordCount":961,"commentCount":2,"publisher":{"@id":"https:\/\/data-flair.training\/blogs\/#organization"},"image":{"@id":"https:\/\/data-flair.training\/blogs\/binary-tree-in-c\/#primaryimage"},"thumbnailUrl":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/06\/Binary-tree-in-C.jpg","keywords":["Binary Tree Implementation","Binary Tree tutorial","C Binary Tree","Declaration of Binary Tree"],"articleSection":["C Tutorials"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/data-flair.training\/blogs\/binary-tree-in-c\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/data-flair.training\/blogs\/binary-tree-in-c\/","url":"https:\/\/data-flair.training\/blogs\/binary-tree-in-c\/","name":"Binary Tree in C - Explore the Reason behind its Popularity - DataFlair","isPartOf":{"@id":"https:\/\/data-flair.training\/blogs\/#website"},"primaryImageOfPage":{"@id":"https:\/\/data-flair.training\/blogs\/binary-tree-in-c\/#primaryimage"},"image":{"@id":"https:\/\/data-flair.training\/blogs\/binary-tree-in-c\/#primaryimage"},"thumbnailUrl":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/06\/Binary-tree-in-C.jpg","datePublished":"2019-06-14T08:46:08+00:00","dateModified":"2021-07-23T07:55:14+00:00","description":"Binary Tree in C is a non-linear data structure, here node is linked to two successor nodes. Let's discuss implementation, requirement, types of Binary tree","breadcrumb":{"@id":"https:\/\/data-flair.training\/blogs\/binary-tree-in-c\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/data-flair.training\/blogs\/binary-tree-in-c\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/data-flair.training\/blogs\/binary-tree-in-c\/#primaryimage","url":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/06\/Binary-tree-in-C.jpg","contentUrl":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/06\/Binary-tree-in-C.jpg","width":802,"height":420,"caption":"Binary tree in C Programming Language"},{"@type":"BreadcrumbList","@id":"https:\/\/data-flair.training\/blogs\/binary-tree-in-c\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Blog Home","item":"https:\/\/data-flair.training\/blogs\/"},{"@type":"ListItem","position":2,"name":"C Tutorials","item":"https:\/\/data-flair.training\/blogs\/category\/c-programming\/"},{"@type":"ListItem","position":3,"name":"Binary Tree in C &#8211; Explore the Reason behind its Popularity"}]},{"@type":"WebSite","@id":"https:\/\/data-flair.training\/blogs\/#website","url":"https:\/\/data-flair.training\/blogs\/","name":"DataFlair","description":"Learn Today. Lead Tomorrow.","publisher":{"@id":"https:\/\/data-flair.training\/blogs\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/data-flair.training\/blogs\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/data-flair.training\/blogs\/#organization","name":"DataFlair","url":"https:\/\/data-flair.training\/blogs\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/data-flair.training\/blogs\/#\/schema\/logo\/image\/","url":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2016\/07\/Data-Flair.png","contentUrl":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2016\/07\/Data-Flair.png","width":106,"height":48,"caption":"DataFlair"},"image":{"@id":"https:\/\/data-flair.training\/blogs\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/DataFlairWS\/","https:\/\/x.com\/DataFlairWS","https:\/\/www.linkedin.com\/company\/dataflair-web-services-pvt-ltd\/","https:\/\/www.youtube.com\/user\/DataFlairWS"]},{"@type":"Person","@id":"https:\/\/data-flair.training\/blogs\/#\/schema\/person\/7f83c342f5d1632d6f7b4b0b0f447823","name":"DataFlair Team","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/4cf3a74600d131330b8c481d519afd1574093ed89f6d3396a95393ad223eb7cd?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/4cf3a74600d131330b8c481d519afd1574093ed89f6d3396a95393ad223eb7cd?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/4cf3a74600d131330b8c481d519afd1574093ed89f6d3396a95393ad223eb7cd?s=96&d=mm&r=g","caption":"DataFlair Team"},"description":"DataFlair Team creates expert-level guides on programming, Java, Python, C++, DSA, AI, ML, data Science, Android, Flutter, MERN, Web Development, and technology. Our goal is to empower learners with easy-to-understand content. Explore our resources for career growth and practical learning.","url":"https:\/\/data-flair.training\/blogs\/author\/dfteam1\/"}]}},"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/posts\/59110","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/users\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/comments?post=59110"}],"version-history":[{"count":10,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/posts\/59110\/revisions"}],"predecessor-version":[{"id":99308,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/posts\/59110\/revisions\/99308"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/media\/59194"}],"wp:attachment":[{"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/media?parent=59110"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/categories?post=59110"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/tags?post=59110"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}