What line in the following algorithm is wrong?Algorithm searchBST (root, targetKey)1   if (empty tree)1.1      return null2   end if3   if (targetKey < root)3.1      return searchBST (left subtree, targetKey)4   else if (targetKey >= root)4.1      return searchBST (right subtree, targetKey)5   else5.1      return root6   end ifend searchBST

A. 3
B. 3.1
C. 4
D. 4.1


Answer: C

Computer Science & Information Technology

You might also like to view...

Answer the following statements true (T) or false (F)

1) The Python function get_input receives input from the user. 2) A valid Python arithmetic expression with no parentheses is evaluated left to right. 3) The following are invalid variable names: 3g, 87 and 2h. 4) The operator != is an example of a relational operator. 5) A variable name identifies the kind of information stored in the object.

Computer Science & Information Technology

The 802.11i standard maps to the WPA2 security protocol.

Answer the following statement true (T) or false (F)

Computer Science & Information Technology

A ________ list is a list of items introduced in a way to indicate definite steps, a sequence of actions, or chronological order

A) justified B) numbered C) bulleted D) sorted

Computer Science & Information Technology

The following is an example of what type of loop? For k = 7 To max Value

A ) Count-controlled B ) Condition-controlled C ) While D ) Do-while E ) Do-until

Computer Science & Information Technology