import java.util.*; public class Solution { public int lowestCommonAncestor (TreeNode root, int p, int q) { //空树找不到公共祖先 if(root == null) return -1; //pq在该节点两边说明这就是最近公共祖先 if((p >= root.val && q <= root.val) || (p <= root.val &&...