Horje
compare two binary tree Code Example
compare two binary tree
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
c# loop through array Code Example c# loop through array Code Example
dynamics 365 update record c# Code Example dynamics 365 update record c# Code Example
Compare trees Code Example Compare trees Code Example
checkbox value unchecked after return view model Code Example checkbox value unchecked after return view model Code Example
Comapre Binary Trees Code Example Comapre Binary Trees Code Example

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