René's URL Explorer Experiment


Title: #66 - Plus One - LeetCode JavaScript Solutions

Open Graph Title: #66 - Plus One - LeetCode JavaScript Solutions

X Title: #66 - Plus One - LeetCode JavaScript Solutions

Description: Given a non-empty array of digits representing a non-negative integer, plus one to the integer. The digits are stored such that the most sig...

Open Graph Description: Given a non-empty array of digits representing a non-negative integer, plus one to the integer. The digits are stored such that the most sig...

X Description: Given a non-empty array of digits representing a non-negative integer, plus one to the integer. The digits are stored such that the most sig...

Keywords:

Opengraph URL: https://leetcodejavascript.com/solutions/plus-one

direct link

Domain: leetcodejavascript.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"Code","url":"https://leetcodejavascript.com/solutions/plus-one","name":"#66 - Plus One - LeetCode JavaScript Solutions","description":"Given a non-empty array of digits representing a non-negative integer, plus one to the integer. The digits are stored such that the most sig...","programmingLanguage":"JavaScript","codeRepository":"https://github.com/JoshCrozier/leetcode-javascript","codeSampleType":"JavaScript","text":"/**\n * @param {number[]} digits\n * @return {number[]}\n */\nvar plusOne = function(digits) {\n let i = digits.length - 1;\n digits[i] += 1;\n while (digits[i] > 9) {\n digits[i--] = 0;\n if (digits[i]) {\n digits[i] += 1;\n } else {\n digits.unshift(1);\n }\n }\n return digits;\n};\n\n// alternative one-liner that breaks the rules:\n/**\n * @param {number[]} digits\n * @return {number[]}\n */\nvar plusOne = function(digits) {\n return String(BigInt(digits.join('')) + BigInt(1)).split('');\n};","keywords":"LeetCode 66, #66 - Plus One, 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/plus-one
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/plus-one/
View on GitHubhttps://github.com/JoshCrozier/leetcode-javascript/blob/master/solutions/0066-plus-one.js
Array https://leetcodejavascript.com/tags/array
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.