Record Case Detail

Notes

This function is in beta test. Please help improve it in the issues here.

Stderr


        

Hints

Your answer may be identical to the JOJ answer in the first several lines.

However, the main problem you meet now is Runtime Error. And the exit code of your program is -11, which should be 0.

Please double check your code to solve this problem and try again.

Your Answer

Entering BinaryTree
val = 25
Entering BinaryTree
val = 10
Entering BinaryTree
val = 20
Entering BinaryTree
val = 20
left.root = 0x56537ab56240
right.root = 0x56537ab56220
Entering ~BinaryTree
Entering removeAll
Entering removeAll
root is nullptr
Entering removeAll
root is nullptr
Entering ~BinaryTree
Entering removeAll
Entering removeAll
root is nullptr
Entering removeAll
root is nullptr
Entering BinaryTree
val = 60
Entering BinaryTree
val = 35
Entering BinaryTree
val = 50
Entering BinaryTree
val = 50
left.root = 0x56537ab56240
right.root = 0x56537ab56220
Entering ~BinaryTree
Entering removeAll
Entering removeAll
root is nullptr
Entering removeAll
root is nullptr
Entering ~BinaryTree
Entering removeAll
Entering removeAll
root is nullptr
Entering removeAll
root is nullptr
Entering BinaryTree
val = 30
Entering BinaryTree
val = 30
left.root = 0x56537ab56260
right.root = 0x56537ab56280
Test 4: In-order Traversal: Entering operator<<
Entering inOrderPrint
Entering inOrderPrint
Entering inOrderPrint
Entering inOrde

JOJ Answer

Test 4: In-order Traversal: 10 20 25 30 35 50 60