Incomplete - Tested 'Find' function; Doesn't always return on the given item but instead will continue past it if it has any children
This commit is contained in:
@ -48,8 +48,13 @@ namespace C_.Datastructures.BinarySearchTree
|
||||
|
||||
}
|
||||
|
||||
public bool Find(T value){
|
||||
var x = Descend(value, Root);
|
||||
return true;
|
||||
}
|
||||
|
||||
private TreeNode<T>? Descend(T value, TreeNode<T>? current)
|
||||
{//Keep trying to determine whether to go left or right until null node is found
|
||||
{//Keep trying to determine whether to go left or right until null node is found that can be appended to
|
||||
if (current == default)
|
||||
return default;
|
||||
|
||||
|
Reference in New Issue
Block a user