Horje
Comapre Binary Trees Code Example
Comapre Binary Trees
public bool IsEqual(Node first, Node second)
{
    if (first == null && second == null) return true;

    if(first != null && second != null)
    {
      return first.data == second.data && 
          IsEqual(first.rightChild,second.rightChild) &&
          IsEqual(first.leftChild,second.leftChild);
    }
    return false;
}


// Node structure

public class Node
{
    private int data;
    private Node leftChild;
    private Node rightChild;
    public Node(int data)
    {
      	this.data = data;
    }
}




Csharp

Related
stop flickering Code Example stop flickering Code Example
C# int to byte Array Code Example C# int to byte Array Code Example
c# datetime get number of week Code Example c# datetime get number of week Code Example
Set value into lookup field in console app using dynamic CRM 365 Code Example Set value into lookup field in console app using dynamic CRM 365 Code Example
c# how do you check if a string contains only digits Code Example c# how do you check if a string contains only digits Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
10