Removed redundant function from Binary Search Tree
This commit is contained in:
parent
e5b0d1659b
commit
88a7a7577e
@ -216,13 +216,5 @@ namespace C_.Datastructures.BinaryTree
|
||||
}
|
||||
return node;
|
||||
}
|
||||
|
||||
private void ReplaceChild(TreeNode<T> parent, TreeNode<T>? replacement){
|
||||
if (parent.Value!.CompareTo(replacement!.Value) < 0)
|
||||
{//Append to left side
|
||||
parent.Left = replacement;
|
||||
}//Append to right side
|
||||
parent.Right = replacement;
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user