Js写法 /* function TreeNode(x) { this.val = x; this.left = null; this.right = null; } */ function HasSubtree(pRoot1, pRoot2) { // write code here if(!pRoot1 || !pRoot2){ return false } if(!compTree(pRoot1,pRoot2)){ //遍历A树 return HasSubtree(pRoot1.left,pRoot2) || HasSubtree(pRoot1.right,pRoot2) } retur...