docs(docs): add ProblemBadges component, layout slot, and enrich pages with topics/video frontmatter, plus guide placeholders and topic‑landing map.

This commit is contained in:
Prad Nukala committed 2026-09-28 11:20:41 -04:00
1 parent b035d1ffa0
commit d2888360e2
104 files changed
+741 -355

No files matched your search

@@ -2,13 +2,16 @@
title: '11. Container With Most Water'
description: You are given an integer array height of length n. There are n vertical lines drawn such that the two endpoints of the i^th line are (i, 0) and (i, height[i])
icon: dot
topics:
- { name: "Array", slug: "array" }
- { name: "Two Pointers", slug: "two-pointers" }
- { name: "Greedy", slug: "greedy" }
video: "UuiTKBwPgAo"
sidebar:
label: 'Container With Most Water'
badge: 'Medium'
---
<Badge variant="accent">Array</Badge>
::::warning
Notice that you may not slant the container.
::::
@@ -63,7 +66,3 @@ class Solution:
return res
```
## Explanation
<YouTube id="UuiTKBwPgAo" title="Container with Most Water - Leetcode 11 - Python" />
@@ -2,13 +2,15 @@
title: '125. Valid Palindrome'
description: A phrase is a palindrome if, after converting all uppercase letters into lowercase letters and removing all non-alphanumeric characters, it reads the same forward and backward. Alphanumeric characters include letters and numbers
icon: dot
topics:
- { name: "Two Pointers", slug: "two-pointers" }
- { name: "String", slug: "string" }
video: "jJXJ16kPFWg"
sidebar:
label: 'Valid Palindrome'
badge: 'Easy'
---
<Badge variant="accent">Two Pointers</Badge>
### Example 1:
- Input: `s = "A man, a plan, a canal: Panama"`
- Output: `true`
@@ -64,7 +66,3 @@ var isPalindrome = function(s) {
return true;
};
```
## Explanation
<YouTube id="jJXJ16kPFWg" title="Valid Palindrome - Leetcode 125 - Python" />
@@ -2,13 +2,16 @@
title: '15. 3Sum'
description: Given an integer array nums, return all the triplets [nums[i], nums[j], nums[k]] such that i != j, i != k, and j != k, and nums[i] + nums[j] + nums[k] == 0
icon: dot
topics:
- { name: "Array", slug: "array" }
- { name: "Two Pointers", slug: "two-pointers" }
- { name: "Sorting", slug: "sorting" }
video: "jzZsG8n2R9A"
sidebar:
label: '3Sum'
badge: 'Medium'
---
<Badge variant="accent">Array</Badge>
::::warning
Notice that the solution set must not contain duplicate triplets.
::::
@@ -99,7 +102,3 @@ class Solution:
return result
```
## Explanation
<YouTube id="jzZsG8n2R9A" title="3Sum - Leetcode 15 - Python" />
@@ -2,13 +2,16 @@
title: '167. Two Sum II - Input Array Is Sorted'
description: Given a 1-indexed array of integers numbers that is already sorted in non-decreasing order, find two numbers such that they add up to a specific target number. Let these two numbers be numbers[index1] and numbers[index2] where 1 <= index1 < index2 <= numbers.length
icon: dot
topics:
- { name: "Array", slug: "array" }
- { name: "Two Pointers", slug: "two-pointers" }
- { name: "Binary Search", slug: "binary-search" }
video: "cQ1Oz4ckceM"
sidebar:
label: 'Two Sum II - Input Array Is Sorted'
badge: 'Medium'
---
<Badge variant="accent">Array</Badge>
::::warning
Your solution must use only constant extra space.
::::
@@ -70,7 +73,3 @@ class Solution:
j-=1
return []
```
## Explanation
<YouTube id="cQ1Oz4ckceM" title="TWO SUM II - Amazon Coding Interview Question - Leetcode 167 - Python" />
@@ -2,13 +2,15 @@
title: '344. Reverse String'
description: Write a function that reverses a string. The input string is given as an array of characters s
icon: dot
topics:
- { name: "Two Pointers", slug: "two-pointers" }
- { name: "String", slug: "string" }
video: "_d0T_2Lk2qA"
sidebar:
label: 'Reverse String'
badge: 'Easy'
---
<Badge variant="accent">Two Pointers</Badge>
:::warning
You must do this by modifying the input array in-place with O(1) extra memory.
:::
@@ -56,7 +58,3 @@ var reverseString = function(s) {
}
};
```
## Explanation
<YouTube id="_d0T_2Lk2qA" title="Reverse String - 3 Ways - Leetcode 344 - Python" />
@@ -2,13 +2,16 @@
title: '392. Is Subsequence'
description: Given two strings s and t, return true if s is a subsequence of t, or false otherwise
icon: dot
topics:
- { name: "Two Pointers", slug: "two-pointers" }
- { name: "String", slug: "string" }
- { name: "Dynamic Programming", slug: "dynamic-programming" }
video: "99RVfqklbCE"
sidebar:
label: 'Is Subsequence'
badge: 'Easy'
---
<Badge variant="accent">Two Pointers</Badge>
::::warning
Suppose there are lots of incoming s, say s1, s2, ..., sk where k >= 10^9, and you want to check one by one to see if t has its subsequence. In this scenario, how would you change your code?
::::
@@ -59,7 +62,3 @@ class Solution:
return i == len(s)
```
## Explanation
<YouTube id="99RVfqklbCE" title="Is Subsequence - Leetcode 392" />
@@ -2,13 +2,16 @@
title: '977. Squares of a Sorted Array'
description: Given an integer array nums sorted in non-decreasing order, return an array of the squares of each number sorted in non-decreasing order
icon: dot
topics:
- { name: "Array", slug: "array" }
- { name: "Two Pointers", slug: "two-pointers" }
- { name: "Sorting", slug: "sorting" }
video: "FPCZsG_AkUg"
sidebar:
label: 'Squares of a Sorted Array'
badge: 'Easy'
---
<Badge variant="accent">Array</Badge>
::::warning
Squaring each element and sorting the new array is very trivial, could you find an O(n) solution using a different approach?
::::
@@ -69,7 +72,3 @@ var sortedSquares = function(nums) {
return ans;
};
```
## Explanation
<YouTube id="FPCZsG_AkUg" title="Squares of a Sorted Array - Leetcode 977 - Python" />