Given two arrays of integers. Create two Binary Search Trees from these numbers. If the inserted value equals to the current node, insert it to the right subtree.
Write a method IsSameTree that checks if two trees are equal or not. Two binary trees are considered equal if they are structurally identical and the nodes have the same value.
Write the code according to the next interface:
You can create (use) additional methods if needed.
The first line contains number n (1 ≤ n ≤ 100). The second line contains n integers.
The third line contains number m (1 ≤ m ≤ 100). The forth line contains m integers.
Create two Binary Search Trees from input data. Print 1 if they are the same and 0 otherwise.