René's URL Explorer Experiment


Title: #257 - Binary Tree Paths - LeetCode JavaScript Solutions

Open Graph Title: #257 - Binary Tree Paths - LeetCode JavaScript Solutions

X Title: #257 - Binary Tree Paths - LeetCode JavaScript Solutions

Description: Given the root of a binary tree, return all root-to-leaf paths in any order. A leaf is a node with no children. ...

Open Graph Description: Given the root of a binary tree, return all root-to-leaf paths in any order. A leaf is a node with no children. ...

X Description: Given the root of a binary tree, return all root-to-leaf paths in any order. A leaf is a node with no children. ...

Keywords:

Opengraph URL: https://leetcodejavascript.com/solutions/binary-tree-paths

direct link

Domain: leetcodejavascript.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"Code","url":"https://leetcodejavascript.com/solutions/binary-tree-paths","name":"#257 - Binary Tree Paths - LeetCode JavaScript Solutions","description":"Given the root of a binary tree, return all root-to-leaf paths in any order. A leaf is a node with no children. ...","programmingLanguage":"JavaScript","codeRepository":"https://github.com/JoshCrozier/leetcode-javascript","codeSampleType":"JavaScript","text":"/**\n * Definition for a binary tree node.\n * function TreeNode(val, left, right) {\n * this.val = (val===undefined ? 0 : val)\n * this.left = (left===undefined ? null : left)\n * this.right = (right===undefined ? null : right)\n * }\n */\n/**\n * @param {TreeNode} root\n * @return {string[]}\n */\nvar binaryTreePaths = function(root) {\n return tranverse(root);\n};\n\nfunction tranverse(node, path = [], result = []) {\n if (!node) return;\n path.push(node.val.toString());\n if (!node.left && !node.right) {\n result.push(path.join('->'));\n } else {\n tranverse(node.left, path.slice(), result);\n tranverse(node.right, path.slice(), result);\n }\n return result;\n}","keywords":"LeetCode 257, #257 - Binary Tree Paths, Easy, JavaScript solution","learningResourceType":"Code","isAccessibleForFree":true,"educationalLevel":"intermediate","interactivityType":"mixed"}

authorLeetCodeJavascript.com
og:typearticle
og:imagehttps://leetcodejavascript.com/og-image.jpg
og:site_nameLeetCode JavaScript Solutions
twitter:cardsummary_large_image
twitter:urlhttps://leetcodejavascript.com/solutions/binary-tree-paths
twitter:imagehttps://leetcodejavascript.com/og-image.jpg
twitter:creator@joshcrozier
theme-color#1f2937

Links:

LeetCodeJavascript.com https://leetcodejavascript.com/
Star on GitHubhttps://github.com/JoshCrozier/leetcode-javascript
Back to all solutionshttps://leetcodejavascript.com
View on LeetCode https://leetcode.com/problems/binary-tree-paths/
View on GitHubhttps://github.com/JoshCrozier/leetcode-javascript/blob/master/solutions/0257-binary-tree-paths.js
String https://leetcodejavascript.com/tags/string
Depth-First Search https://leetcodejavascript.com/tags/depth-first-search
Tree https://leetcodejavascript.com/tags/tree
Binary Tree https://leetcodejavascript.com/tags/binary-tree
Backtrackinghttps://leetcodejavascript.com/tags/backtracking
Josh Crozierhttps://joshcrozier.com

Viewport: width=device-width,initial-scale=1

Robots: index, follow


URLs of crawlers that visited me.