Check if a binary tree is subtree of another binary tree
Given two binary trees, check if the first tree is subtree of the second one. Code: package trees; public class N2011_subTree { Node root1, root2; static class Node{ int data; Node left, right; Node(int data){ this.data = data; left = right = null; } } static boolean isIdentical(Node n1, Node n2){ if(n1 == null && n2 == null){ return true; } if(n1 != null && n2 != null){ return (n1.data =...