René's URL Explorer Experiment


Title: #1086 - High Five - LeetCode JavaScript Solutions

Open Graph Title: #1086 - High Five - LeetCode JavaScript Solutions

X Title: #1086 - High Five - LeetCode JavaScript Solutions

Description: Given a list of the scores of different students, items, where items[i] = [IDi, scorei] represents one score from a student with IDi, calcul...

Open Graph Description: Given a list of the scores of different students, items, where items[i] = [IDi, scorei] represents one score from a student with IDi, calcul...

X Description: Given a list of the scores of different students, items, where items[i] = [IDi, scorei] represents one score from a student with IDi, calcul...

Keywords:

Opengraph URL: https://leetcodejavascript.com/solutions/high-five

direct link

Domain: leetcodejavascript.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"Code","url":"https://leetcodejavascript.com/solutions/high-five","name":"#1086 - High Five - LeetCode JavaScript Solutions","description":"Given a list of the scores of different students, items, where items[i] = [IDi, scorei] represents one score from a student with IDi, calcul...","programmingLanguage":"JavaScript","codeRepository":"https://github.com/JoshCrozier/leetcode-javascript","codeSampleType":"JavaScript","text":"/**\n * @param {number[][]} items\n * @return {number[][]}\n */\nvar highFive = function(items) {\n const studentScores = new Map();\n\n for (const [id, score] of items) {\n if (!studentScores.has(id)) {\n studentScores.set(id, []);\n }\n studentScores.get(id).push(score);\n }\n\n const result = [];\n for (const [id, scores] of studentScores) {\n scores.sort((a, b) => b - a);\n const topFiveSum = scores.slice(0, 5).reduce((sum, score) => sum + score, 0);\n const average = Math.floor(topFiveSum / 5);\n result.push([id, average]);\n }\n\n result.sort((a, b) => a[0] - b[0]);\n\n return result;\n};","keywords":"LeetCode 1086, #1086 - High Five, 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/high-five
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/high-five/
View on GitHubhttps://github.com/JoshCrozier/leetcode-javascript/blob/master/solutions/1086-high-five.js
Array https://leetcodejavascript.com/tags/array
Hash Table https://leetcodejavascript.com/tags/hash-table
Sorting https://leetcodejavascript.com/tags/sorting
Heap Priority Queuehttps://leetcodejavascript.com/tags/heap-priority-queue
Josh Crozierhttps://joshcrozier.com

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

Robots: index, follow


URLs of crawlers that visited me.