René's URL Explorer Experiment


Title: #563 - Binary Tree Tilt - LeetCode JavaScript Solutions

Open Graph Title: #563 - Binary Tree Tilt - LeetCode JavaScript Solutions

X Title: #563 - Binary Tree Tilt - LeetCode JavaScript Solutions

Description: Given the root of a binary tree, return the sum of every tree node's tilt. The tilt of a tree node is the absolute difference between t...

Open Graph Description: Given the root of a binary tree, return the sum of every tree node's tilt. The tilt of a tree node is the absolute difference between t...

X Description: Given the root of a binary tree, return the sum of every tree node's tilt. The tilt of a tree node is the absolute difference between t...

Keywords:

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

direct link

Domain: leetcodejavascript.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"Code","url":"https://leetcodejavascript.com/solutions/binary-tree-tilt","name":"#563 - Binary Tree Tilt - LeetCode JavaScript Solutions","description":"Given the root of a binary tree, return the sum of every tree node's tilt. The tilt of a tree node is the absolute difference between t...","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 {number}\n */\nvar findTilt = function(root) {\n const result = { val: 0 };\n dfs(root, result);\n return result.val;\n};\n\nfunction dfs(root, tilt) {\n if (!root) return 0;\n const left = dfs(root.left, tilt);\n const right = dfs(root.right, tilt);\n tilt.val += Math.abs(left - right);\n return root.val + left + right;\n}","keywords":"LeetCode 563, #563 - Binary Tree Tilt, 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-tilt
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-tilt/
View on GitHubhttps://github.com/JoshCrozier/leetcode-javascript/blob/master/solutions/0563-binary-tree-tilt.js
Depth-First Search https://leetcodejavascript.com/tags/depth-first-search
Tree https://leetcodejavascript.com/tags/tree
Binary Treehttps://leetcodejavascript.com/tags/binary-tree
Josh Crozierhttps://joshcrozier.com

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

Robots: index, follow


URLs of crawlers that visited me.