Hi, I think the question with BST is misleading. You can’t assign a value to root parameter like this. Java is pass-by-value. It will have no effect.
B)
if (root == null) { root = newTreeNode(data); return; }
Type your question above this line.
Course: https://www.educative.io/collection/10370001/5996180548878336
Lesson: https://www.educative.io/collection/page/10370001/5996180548878336/4903821299941376