educative.io

Provided solution fails some test cases

Provided solutions seems to assume that the binary search tree root will have both left and right child.
The solution fails in cases where the root has only on child.

eg :
100
50
25 67
68

Should print - 100 50 25 68 67
but instead prints - 100,50,25,68


Type your question above this line.

Course: https://www.educative.io/collection/5642554087309312/5679846214598656
Lesson: https://www.educative.io/collection/page/5642554087309312/5679846214598656/10005

@Nikhil_AM

The course is updated along with the test cases. Kindly have a look again.

In case of any confusion, feel free to ask :slight_smile: