public void visit(TreeNode node, int currentSum, int sum, ArrayList<Integer> list,
			ArrayList<ArrayList<Integer>> res) {
		if(node == null) return;
		currentSum += node.val;
		list.add(node.val);
		if(node.left == null && node.right == null) {
			if(currentSum == sum) {
				ArrayList<Integer> temp = new ArrayList<Integer>();
				temp.addAll(list);
				res.add(temp);
			}
		} else {
			if(node.left != null) visit(node.left, currentSum, sum, list, res);
			if(node.right != null) visit(node.right, currentSum, sum, list, res);
		}
		list.remove(list.size() - 1);
	}