From 5d2251c3dd8769b10d56b094c0d7856783e4d253 Mon Sep 17 00:00:00 2001 From: Mohit Arora <32641304+mohitarora3@users.noreply.github.com> Date: Mon, 30 Sep 2019 23:50:40 +0530 Subject: [PATCH] Update root-to-leaf_path(binary_tree).cpp --- root-to-leaf_path(binary_tree).cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/root-to-leaf_path(binary_tree).cpp b/root-to-leaf_path(binary_tree).cpp index 16e747b..13cbd32 100644 --- a/root-to-leaf_path(binary_tree).cpp +++ b/root-to-leaf_path(binary_tree).cpp @@ -2,7 +2,7 @@ Question 6: -(BINARYTREE): Given a binary tree, print out all its root –to –leaf paths. +(BINARYTREE): Given a binary tree, print out all its root –to –leaf paths. */ #include @@ -51,7 +51,7 @@ void all_paths(struct node *root,queue q,queue q_temp) else { /* if the node has both the left and right node then the root is pushed into the queue and - then the function is recalled with the subnodes as the root nodes */ + then the function is recalled with the subnodes as the root nodes */ if(root->left!=NULL&&root->right!=NULL) { q.push(root->data); @@ -94,7 +94,7 @@ struct node* newnode(int data) int main() /* - objective: to print out all its root –to –leaf paths of given binary tree + objective: to print out all its root –to –leaf paths of given binary tree input parameters: none output value: none approach: a recursive function is called