There are two lines with errors in the following algorithm. One of them is _____.Algorithm addBST (root, newNode)1 if (empty tree)1.1 set root to newNode1.2 return newNode2 end if3 if (newNode < root)3.1 addBST (left subtree, newNode)4 else4.1 addBST (right subtree, newNode)5 end ifend addBST
A. 1.1
B. 1.2
C. 3
D. 3.1
Answer: D
You might also like to view...
In Windows XP, shortcuts (the icons that users put on their desktop) are implemented as soft links—if the file or programto which they are connected is moved, the shortcuts point to nothing.What are the advantages and disadvantages of replacing shortcuts with hard links?
What will be an ideal response?
The project ____ date can be the date you want the project to consider as today's date.
A. Base B. Status C. Start D. Current
Which of the following media types is LEAST likely to be affected by electromagnetic interference?
A. Coaxial B. Fiber C. Wireless B D. HSPA
What would display if following statements are coded and executed?
``` Declare Integer scores[3]= 76, 94, 83 Declare String names[3] = "Joe", "Amy", "Pat" Display names[1] Display "Your test score is: " Display scores[2] ``` a. Joe Your test score is: 94 b. Amy Your test score is: 83 c. Joe Your test score is: 76 d. Amy Your test score is: 94