public TreeNode FindRecursively(int value) { //return the node if the data is equal to value and soft delete is false if (value == Data && IsDeleted == false) { return(this); } //if the value is less than the data and the left node is not null, invoke FindRecursively on the left child node if (value < Data && LeftNode != null) { return(LeftNode.FindRecursively(value)); } //else, check if the value is greater than the data and the right node is not null, invoke FindRecursively //on the right child node if (RightNode != null) { return(RightNode.FindRecursively(value)); } //return null if none of the above return value return(null); }