René's URL Explorer Experiment


Title: #456 - 132 Pattern - LeetCode JavaScript Solutions

Open Graph Title: #456 - 132 Pattern - LeetCode JavaScript Solutions

X Title: #456 - 132 Pattern - LeetCode JavaScript Solutions

Description: Given an array of n integers nums, a 132 pattern is a subsequence of three integers nums[i], nums[j] and nums[k] such that i < j < k a...

Open Graph Description: Given an array of n integers nums, a 132 pattern is a subsequence of three integers nums[i], nums[j] and nums[k] such that i < j < k a...

X Description: Given an array of n integers nums, a 132 pattern is a subsequence of three integers nums[i], nums[j] and nums[k] such that i < j < k a...

Keywords:

Opengraph URL: https://leetcodejavascript.com/solutions/132-pattern

direct link

Domain: leetcodejavascript.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"Code","url":"https://leetcodejavascript.com/solutions/132-pattern","name":"#456 - 132 Pattern - LeetCode JavaScript Solutions","description":"Given an array of n integers nums, a 132 pattern is a subsequence of three integers nums[i], nums[j] and nums[k] such that i < j < k a...","programmingLanguage":"JavaScript","codeRepository":"https://github.com/JoshCrozier/leetcode-javascript","codeSampleType":"JavaScript","text":"/**\n * @param {number[]} nums\n * @return {boolean}\n */\nvar find132pattern = function(nums) {\n  const stack = [];\n\n  for (let i = nums.length - 1, j = -Infinity; i >= 0; i--) {\n    while (nums[i] > stack[stack.length - 1]) {\n      j = stack.pop();\n    }\n    if (nums[i] < j) {\n      return true;\n    }\n    stack.push(nums[i]);\n  }\n\n  return false;\n};","keywords":"LeetCode 456, #456 - 132 Pattern, 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/132-pattern
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/132-pattern/
View on GitHub https://github.com/JoshCrozier/leetcode-javascript/blob/master/solutions/0456-132-pattern.js
Array https://leetcodejavascript.com/tags/array
Binary Search https://leetcodejavascript.com/tags/binary-search
Stack https://leetcodejavascript.com/tags/stack
Ordered Set https://leetcodejavascript.com/tags/ordered-set
Monotonic Stack https://leetcodejavascript.com/tags/monotonic-stack
Josh Crozierhttps://joshcrozier.com

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

Robots: index, follow


URLs of crawlers that visited me.