René's URL Explorer Experiment


Title: #356 - Line Reflection - LeetCode JavaScript Solutions

Open Graph Title: #356 - Line Reflection - LeetCode JavaScript Solutions

X Title: #356 - Line Reflection - LeetCode JavaScript Solutions

Description: Given n points on a 2D plane, find if there is such a line parallel to the y-axis that reflects the given points symmetrically. In other wor...

Open Graph Description: Given n points on a 2D plane, find if there is such a line parallel to the y-axis that reflects the given points symmetrically. In other wor...

X Description: Given n points on a 2D plane, find if there is such a line parallel to the y-axis that reflects the given points symmetrically. In other wor...

Keywords:

Opengraph URL: https://leetcodejavascript.com/solutions/line-reflection

direct link

Domain: leetcodejavascript.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"Code","url":"https://leetcodejavascript.com/solutions/line-reflection","name":"#356 - Line Reflection - LeetCode JavaScript Solutions","description":"Given n points on a 2D plane, find if there is such a line parallel to the y-axis that reflects the given points symmetrically. In other wor...","programmingLanguage":"JavaScript","codeRepository":"https://github.com/JoshCrozier/leetcode-javascript","codeSampleType":"JavaScript","text":"/**\n * @param {number[][]} points\n * @return {boolean}\n */\nvar isReflected = function(points) {\n const pointSet = new Set(points.map(([x, y]) => `${x},${y}`));\n let minX = Infinity;\n let maxX = -Infinity;\n\n for (const [x] of points) {\n minX = Math.min(minX, x);\n maxX = Math.max(maxX, x);\n }\n\n const sum = minX + maxX;\n for (const [x, y] of points) {\n if (!pointSet.has(`${sum - x},${y}`)) {\n return false;\n }\n }\n\n return true;\n};","keywords":"LeetCode 356, #356 - Line Reflection, Medium, 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/line-reflection
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/line-reflection/
View on GitHubhttps://github.com/JoshCrozier/leetcode-javascript/blob/master/solutions/0356-line-reflection.js
Array https://leetcodejavascript.com/tags/array
Hash Table https://leetcodejavascript.com/tags/hash-table
Mathhttps://leetcodejavascript.com/tags/math
Josh Crozierhttps://joshcrozier.com

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

Robots: index, follow


URLs of crawlers that visited me.