package leetcode;

/**
 * https://leetcode.com/problems/pseudo-palindromic-paths-in-a-binary-tree/
 */
public class Problem1457 {
    public static class TreeNode {
        int val;
        TreeNode left;
        TreeNode right;

        TreeNode() {
        }

        TreeNode(int val) {
            this.val = val;
        }

        TreeNode(int val, TreeNode left, TreeNode right) {
            this.val = val;
            this.left = left;
            this.right = right;
        }
    }

    public int pseudoPalindromicPaths(TreeNode root) {
        // TODO
        return 0;
    }

    public static void main(String[] args) {
        Problem1457 prob = new Problem1457();
    }
}

@@ -674,16 +674,741 @@
 m1457();
+%0A%0A        TreeNode root = new TreeNode(2);%0A        root.left = new TreeNode(3);%0A        root.left.left = new TreeNode(3);%0A        root.left.right = new TreeNode(1);%0A        root.right = new TreeNode(1);%0A        root.right.right = new TreeNode(1);%0A        System.out.println(prob.pseudoPalindromicPaths(root)); // 2%0A%0A        root = new TreeNode(2);%0A        root.left = new TreeNode(1);%0A        root.left.left = new TreeNode(1);%0A        root.left.right = new TreeNode(3);%0A        root.left.right.right = new TreeNode(1);%0A        root.right = new TreeNode(1);%0A        System.out.println(prob.pseudoPalindromicPaths(root)); // 1%0A%0A        root = new TreeNode(9);%0A        System.out.println(prob.pseudoPalindromicPaths(root)); // 1
 %0A    %7D%0A%7D

Update problem 1457