package leetcode;

import java.util.List;

/**
 * https://leetcode.com/problems/all-nodes-distance-k-in-binary-tree/
 */
public class Problem863 {
    public static class TreeNode {
        int val;
        TreeNode left;
        TreeNode right;

        TreeNode(int x) {
            val = x;
        }
    }

    public List<Integer> distanceK(TreeNode root, TreeNode target, int K) {
        // TODO
        return null;
    }

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

@@ -513,16 +513,476 @@
 m863();%0A
+        TreeNode root = new TreeNode(3);%0A        root.left = new TreeNode(5);%0A        root.left.left = new TreeNode(6);%0A        root.left.right = new TreeNode(2);%0A        root.left.right.left = new TreeNode(7);%0A        root.left.right.right = new TreeNode(4);%0A        root.right = new TreeNode(1);%0A        root.right.left = new TreeNode(0);%0A        root.right.right = new TreeNode(8);%0A        System.out.println(prob.distanceK(root, root.left, 2)); // %5B7,4,1%5D%0A
     %7D%0A%7D%0A

Update problem 863