Question
Complete the recursive search function for a Binary
Search Tree (BST). class Node: def __init__(self, data): self.data = data self.left = None self.right = None def search(root, key): if root is None or root.data == key: return root if key < root.data: _________ # Line to complete (search left subtree) else: _________ # Line to complete (search right subtree)Solution
The correct answer is A
The perimeter of a rectangle is 150% more than perimeter of a square of side 10 cm. If the length of rectangle is 250% more than side of square then fin...
Which factor(s) led scientists towards the classification of elements?
(i) Different methods of synthesis of elements
(ii) Different sourc...
Who is siting on the seat number 7?
Find the average of first 10 whole numbers.
Which of the following statements is incorrectly mentioned with respect to Asian Development Bank?
A shopkeeper sold an article after giving a discount of 25% and made a profit of Rs.64. Find the difference between the marked price and selling price o...
Within how many days should an appeal be filed against a commissioner's order under the employee compensation act 1923?
Which of the following statement is/are correct regarding the “Ayushman Bharat scheme”?
I. Ayushman Bharat Yojana or...
A and B invested Rs.5000 and Rs.7000 in a business respectively and after 5 months B withdrawn 50% of his initial investment and again after 5 months he...
In a certain code language, ‘ki ru pi’ means ‘nobody like cruel’, ‘ki mi cha’ means ‘king was cruel’ and ‘ru pi cha’ means ‘nobody...