Difficulty Level: MEDIUM
Problem Statement:
Given the root nodes of the two binary search trees. The task is to print “Both BSTs are identical” if the two Binary Search Trees are identical else print “Both BSTs are identical”. Two trees are identical if they are identical structurally and nodes have the same values.
Input:
Output:
Both BSTs are identical