Trying to Incorporate Find function but teek getting warnings that Type T cannot be comfirmed as a reference type. (Could be a struct) Need to find oput why it is affecting BST but not Linked List etc...
This commit is contained in:
		@@ -48,9 +48,11 @@ namespace C_.Datastructures.BinarySearchTree
 | 
			
		||||
            
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        public bool Find(T value){
 | 
			
		||||
            var x = Descend(value, Root);
 | 
			
		||||
            return true;
 | 
			
		||||
        public bool Find(T? value){
 | 
			
		||||
            if (Root.Value != default || Root.Value == value)
 | 
			
		||||
            {
 | 
			
		||||
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        private TreeNode<T>? Descend(T value, TreeNode<T>? current)
 | 
			
		||||
 
 | 
			
		||||
@@ -6,7 +6,7 @@ using C_.Datastructures.Generic;
 | 
			
		||||
 | 
			
		||||
namespace C_.Datastructures.BinarySearchTree
 | 
			
		||||
{
 | 
			
		||||
    internal class TreeNode<T>:DirectedNode<T, TreeNode<T>>
 | 
			
		||||
    internal class TreeNode<T> : DirectedNode<T, TreeNode<T>>
 | 
			
		||||
    {
 | 
			
		||||
        //All properties inherited from base class
 | 
			
		||||
        public static TreeNode<T> Create(T? value){
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user