Question: c ) ( 3 marks ) The method to insert an item into a binary search tree is given below. Complete the code where indicated
c marks The method to insert an item into a binary search tree is given below. Complete the code where indicated to permit duplicate insertions of an item.private Node AddI item, Node nodeif node nullreturn new Node item ;elseif item CompareTo nodeItemnode Left Add item node.Left ;return node;elseif item CompareTo nodeItemnodeRight Add item node.Right ;return node;else In c#
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
