Write a recursive function named search that takes as input


1. Write a recursive function named search that takes as input the pointer to the root of a binary tree (not a BST!) and a value K, and returns true if value K appears in the tree and false otherwise.

2. Write an algorithm that takes as input the pointer to the root of a binary tree and prints the node values of the tree in level order. Level order first prints the root, then all nodes of level 1, then all nodes of level 2, and so on. Hint: Preorder traversals make use of a stack through recursive calls. Consider making use of another data structure to help implement the level order traversal.

Request for Solution File

Ask an Expert for Answer!!
Basic Computer Science: Write a recursive function named search that takes as input
Reference No:- TGS01649388

Expected delivery within 24 Hours