/* * function TreeNode(x) { * this.val = x; * this.left = null; * this.right = null; * } */ /** * * 思路和比较常见的,就是js代码好像比别的语言简洁一些,尤其用了es6的扩展运算符 */ function pathSum( root , sum ) { // write code here let arr = []; function dfs(node, sum, path){ if(node==null){ ...