Q. Compute the total number of operations required to convert one N-ary tree to another.
class TreeNode {
String key;
int value;
List<TreeNode> children;
}
Tree-1
a(1)
/ \
b(2) c(3)
/ \ \
d(4) e(5) f(6) Tree-2
a(1)
\
c(3)
\
f(66)
Operations:
Total Operations done (Count = 4)