Simple 1ms Java solution with easy comments
/*\n        \u5411\u5de6\u53f3\u4e24\u8fb9\u8981\u6570\u636e, \u9010\u5c42\u5411\u4e0a\u8fd4\u56de\u3002\n        \u8fd4\u56de\u7684\u662fint[2] result.\n      
    /*\n        \u5411\u5de6\u53f3\u4e24\u8fb9\u8981\u6570\u636e, \u9010\u5c42\u5411\u4e0a\u8fd4\u56de\u3002\n        \u8fd4\u56de\u7684\u662fint[2] result.\n        result[0] -- \u62a2\u5f53\u524droot\u6240\u80fd\u5f97\u7684\u6700\u5927\u503c\u3002\n        result[1] -- \u4e0d\u62a2\u5f53\u524droot\u6240\u80fd\u5f97\u7684\u6700\u5927\u503c\u3002\n    */\n    public class Solution {\n        public int rob(TreeNode root) {\n            int[] result = findMax(root);\n            return Math.max(result[0], result[1]);\n        }\n        \n        // returns int[2] result. \n        // result[0] -- max value robbing current root; result[1] -- max value without robbing current root.\n        private int[] findMax(TreeNode root) {\n            if (root == null) {\n                return new int[] {0, 0};\n            }\n            int[] left = findMax(root.left);\n            int[] right = findMax(root.right);\n            int result0 = root.val + left[1] + right[1];  // rob current root\n            int result1 = Math.max(left[0], left[1]) + Math.max(right[0], right[1]);  // not rob current root\n            return new int[] {result0, result1};\n        }\n    }
[]