SK-SUR263P1, Seiko, 41, 3.555
OR-FUNG800300, Orient, 40, 3.762
h. f3(): Insert into the current tree a new Watch which code = 'OR-FGW01006W0', make = 'Orient',size = 38, price = k, where k is height of the current tree before insertion.
Expected result:
OR-FUNG8003D0, Orient, 40, 3.762 CT-BM7466-81H, Citizen, 40, 7.590
CT-CA7060-88L, Citizen, 42, 8.540
OR-FGW01006W0, Orient, 38, 3.000
SK-SUR263P1, Seiko, 41, 3.555 SK-SUR211P1, Seiko, 42, 3.690
i. f4(): Decrease the Watch's price of all nodes that have size = 40 by 1.
Expected result:
OR-FUNG8003D0, Orient, 40, 2.762
CT-BM7466-81H, Citizen, 40, 6.590 SK-SUR263P1, Seiko, 41, 3.555
CT-CA7060-88L, Citizen, 42, 8.540
SK-SUR211P1, Seiko, 42, 3.690
j. f5(): Remove all leaf nodes from the given BST.
Expected result:
OR-FUNG8003D0, Orient, 40, 3.762
CT-BM7466-81H, Citizen, 40, 7.590
SK-SUR263P1, Seiko, 41, 3.555
Zoom
+ 100%
Close