using System; using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; using C_.Datastructures.Generic; namespace C_.Datastructures.BinarySearchTree { internal class TreeNode : DirectedNode> { //All properties inherited from base class public static TreeNode Create(T? value){ //Create a new node without any children return new TreeNode{ Value = value }; } public static TreeNode Create(T? value, TreeNode? left, TreeNode? right){ //Create a new node with the option of having children return new TreeNode{ Value = value, Left = left, Right = right }; } } }