René's URL Explorer Experiment


Title: #984 - String Without AAA or BBB - LeetCode JavaScript Solutions

Open Graph Title: #984 - String Without AAA or BBB - LeetCode JavaScript Solutions

X Title: #984 - String Without AAA or BBB - LeetCode JavaScript Solutions

Description: Given two integers a and b, return any string s such that: s has length a + b and contains exactly a 'a' letters, and exactly b &...

Open Graph Description: Given two integers a and b, return any string s such that: s has length a + b and contains exactly a 'a' letters, and exactly b &...

X Description: Given two integers a and b, return any string s such that: s has length a + b and contains exactly a 'a' letters, and exactly b &...

Keywords:

Opengraph URL: https://leetcodejavascript.com/solutions/string-without-aaa-or-bbb

direct link

Domain: leetcodejavascript.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"Code","url":"https://leetcodejavascript.com/solutions/string-without-aaa-or-bbb","name":"#984 - String Without AAA or BBB - LeetCode JavaScript Solutions","description":"Given two integers a and b, return any string s such that: s has length a + b and contains exactly a 'a' letters, and exactly b &...","programmingLanguage":"JavaScript","codeRepository":"https://github.com/JoshCrozier/leetcode-javascript","codeSampleType":"JavaScript","text":"/**\n * @param {number} a\n * @param {number} b\n * @return {string}\n */\nvar strWithout3a3b = function(a, b) {\n let result = '';\n\n while (a > 0 || b > 0) {\n if (a > b && a > 0 && !result.endsWith('aa')) {\n result += 'a';\n a--;\n } else if (b > 0 && !result.endsWith('bb')) {\n result += 'b';\n b--;\n } else if (a > 0) {\n result += 'a';\n a--;\n } else {\n result += 'b';\n b--;\n }\n }\n\n return result;\n};","keywords":"LeetCode 984, #984 - String Without AAA or BBB, 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/string-without-aaa-or-bbb
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/string-without-aaa-or-bbb/
View on GitHubhttps://github.com/JoshCrozier/leetcode-javascript/blob/master/solutions/0984-string-without-aaa-or-bbb.js
String https://leetcodejavascript.com/tags/string
Greedyhttps://leetcodejavascript.com/tags/greedy
Josh Crozierhttps://joshcrozier.com

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

Robots: index, follow


URLs of crawlers that visited me.