Question: A binary tree structure is defined as follows: struct Tree { int item; struct Tree * left_child; struct Tree * right_child; } If a left

A binary tree structure is defined as follows: struct Tree { int item; struct Tree * left_child; struct Tree * right_child; } If a left child or right child does not exist, the corresponding member variable is set to NULL. Write a recursive function int positive(struct Tree * tree) that returns 0 if there is at least one node that has a negative integer and 1 otherwise (all the nodes have integers that are greater than or equal to 0). (Your program should not crash.)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!