René's URL Explorer Experiment


Title: #91 - Decode Ways - LeetCode JavaScript Solutions

Open Graph Title: #91 - Decode Ways - LeetCode JavaScript Solutions

X Title: #91 - Decode Ways - LeetCode JavaScript Solutions

Description: You have intercepted a secret message encoded as a string of numbers. The message is decoded via the following mapping: "1" -> ...

Open Graph Description: You have intercepted a secret message encoded as a string of numbers. The message is decoded via the following mapping: "1" -> ...

X Description: You have intercepted a secret message encoded as a string of numbers. The message is decoded via the following mapping: "1" -> ...

Keywords:

Opengraph URL: https://leetcodejavascript.com/solutions/decode-ways

direct link

Domain: leetcodejavascript.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"Code","url":"https://leetcodejavascript.com/solutions/decode-ways","name":"#91 - Decode Ways - LeetCode JavaScript Solutions","description":"You have intercepted a secret message encoded as a string of numbers. The message is decoded via the following mapping: "1" -> ...","programmingLanguage":"JavaScript","codeRepository":"https://github.com/JoshCrozier/leetcode-javascript","codeSampleType":"JavaScript","text":"/**\n * @param {string} s\n * @return {number}\n */\nvar numDecodings = function(s) {\n  if (s == null || s.length === 0) return 0;\n  if (s[0] === '0') return 0;\n\n  const group = new Array(s.length + 1).fill(0);\n  group[0] = 1;\n  group[1] = 1;\n\n  for (let i = 2; i <= s.length; i++) {\n    const a = Number(s.slice(i - 1, i));\n    if (a >= 1 && a <= 9) {\n      group[i] += group[i - 1];\n    }\n\n    const b = Number(s.slice(i - 2, i));\n    if (b >= 10 && b <= 26) {\n      group[i] += group[i - 2];\n    }\n  }\n\n  return group[s.length];\n};","keywords":"LeetCode 91, #91 - Decode Ways, 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/decode-ways
twitter:imagehttps://leetcodejavascript.com/og-image.jpg
twitter:creator@joshcrozier
theme-color#1f2937

Links:

LeetCodeJavascript.com https://leetcodejavascript.com/
Star on GitHub https://github.com/JoshCrozier/leetcode-javascript
Back to all solutions https://leetcodejavascript.com
View on LeetCode https://leetcode.com/problems/decode-ways/
View on GitHub https://github.com/JoshCrozier/leetcode-javascript/blob/master/solutions/0091-decode-ways.js
String https://leetcodejavascript.com/tags/string
Dynamic Programming https://leetcodejavascript.com/tags/dynamic-programming
Josh Crozierhttps://joshcrozier.com

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

Robots: index, follow


URLs of crawlers that visited me.