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,18 @@
title: '215. Kth Largest Element in an Array'
description: Given an integer array nums and an integer k, return the k^th largest element in the array
icon: dot
topics:
- { name: "Array", slug: "array" }
- { name: "Divide and Conquer", slug: "divide-and-conquer" }
- { name: "Sorting", slug: "sorting" }
- { name: "Heap (Priority Queue)", slug: "heap-priority-queue" }
- { name: "Quickselect", slug: "quickselect" }
video: "XEmy13g1Qxc"
sidebar:
label: 'Kth Largest Element in an Array'
badge: 'Medium'
---
<Badge variant="accent">Array</Badge>
### Example 1:
- Input: `nums = [3,2,1,5,6,4], k = 2`
- Output: `5`
@@ -54,7 +59,3 @@ class Solution:
return -heapq.heappop(nums)
```
## Explanation
<YouTube id="XEmy13g1Qxc" title="Kth Largest Element in an Array - Quick Select - Leetcode 215 - Python" />
@@ -2,13 +2,18 @@
title: '23. Merge k Sorted Lists'
description: You are given an array of k linked-lists lists, each linked-list is sorted in ascending order
icon: dot
topics:
- { name: "Linked List", slug: "linked-list" }
- { name: "Divide and Conquer", slug: "divide-and-conquer" }
- { name: "Heap (Priority Queue)", slug: "heap-priority-queue" }
- { name: "Merge Sort", slug: "merge-sort" }
- { name: "Tournament Sort", slug: "tournament-sort" }
video: "q5a5OiGbT6Q"
sidebar:
label: 'Merge k Sorted Lists'
badge: 'Hard'
---
<Badge variant="accent">Linked List</Badge>
### Example 1:
- Input: `lists = [[1,4,5],[1,3,4],[2,6]]`
- Output: `[1,1,2,3,4,4,5,6]`
@@ -89,7 +94,3 @@ class Solution:
# Space: O(n)
return D.next
```
## Explanation
<YouTube id="q5a5OiGbT6Q" title="Merge K Sorted Lists - Leetcode 23 - Python" />
@@ -2,13 +2,21 @@
title: '973. K Closest Points to Origin'
description: Given an array of points where points[i] = [xi, yi] represents a point on the X-Y plane and an integer k, return the k closest points to the origin (0, 0)
icon: dot
topics:
- { name: "Array", slug: "array" }
- { name: "Math", slug: "math" }
- { name: "Divide and Conquer", slug: "divide-and-conquer" }
- { name: "Geometry", slug: "geometry" }
- { name: "Sorting", slug: "sorting" }
- { name: "Heap (Priority Queue)", slug: "heap-priority-queue" }
- { name: "Quickselect", slug: "quickselect" }
- { name: "K-D Tree", slug: "k-d-tree" }
video: "rI2EBUEMfTk"
sidebar:
label: 'K Closest Points to Origin'
badge: 'Medium'
---
<Badge variant="accent">Array</Badge>
### Example 1:
- Input: `points = [[1,3],[-2,2]], k = 1`
- Output: `[[-2,2]]`
@@ -64,7 +72,3 @@ class Solution:
return res
```
## Explanation
<YouTube id="rI2EBUEMfTk" title="K Closest Points to Origin - Heap / Priority Queue - Leetcode 973 - Python" />