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,17 @@
title: '104. Maximum Depth of Binary Tree'
description: Given the root of a binary tree, return its maximum depth
icon: dot
topics:
- { name: "Tree", slug: "tree" }
- { name: "Depth-First Search", slug: "depth-first-search" }
- { name: "Breadth-First Search", slug: "breadth-first-search" }
- { name: "Binary Tree", slug: "binary-tree" }
video: "hTM3phVI6YQ"
sidebar:
label: 'Maximum Depth of Binary Tree'
badge: 'Easy'
---
<Badge variant="accent">Tree</Badge>
### Example 1:
- Input: `root = [3,9,20,null,null,15,7]`
- Output: `3`
@@ -48,7 +52,3 @@ class Solution:
return 1 + max(self.maxDepth(root.left), self.maxDepth(root.right))
```
## Explanation
<YouTube id="hTM3phVI6YQ" title="Maximum Depth of Binary Tree - 3 Solutions - Leetcode 104 - Python" />
@@ -2,13 +2,17 @@
title: '226. Invert Binary Tree'
description: Given the root of a binary tree, invert the tree, and return its root
icon: dot
topics:
- { name: "Tree", slug: "tree" }
- { name: "Depth-First Search", slug: "depth-first-search" }
- { name: "Breadth-First Search", slug: "breadth-first-search" }
- { name: "Binary Tree", slug: "binary-tree" }
video: "OnSn2XEQ4MY"
sidebar:
label: 'Invert Binary Tree'
badge: 'Easy'
---
<Badge variant="accent">Tree</Badge>
### Example 1:
- Input: `root = [4,2,7,1,3,6,9]`
- Output: `[4,7,2,9,6,3,1]`
@@ -59,7 +63,3 @@ class Solution:
return root
```
## Explanation
<YouTube id="OnSn2XEQ4MY" title="Invert Binary Tree - Depth First Search - Leetcode 226" />
@@ -2,13 +2,17 @@
title: '236. Lowest Common Ancestor of a Binary Tree'
description: Given a binary tree, find the lowest common ancestor (LCA) of two given nodes in the tree
icon: dot
topics:
- { name: "Tree", slug: "tree" }
- { name: "Depth-First Search", slug: "depth-first-search" }
- { name: "Binary Tree", slug: "binary-tree" }
- { name: "Binary Lifting", slug: "binary-lifting" }
- { name: "Lowest Common Ancestor", slug: "lowest-common-ancestor" }
sidebar:
label: 'Lowest Common Ancestor of a Binary Tree'
badge: 'Medium'
---
<Badge variant="accent">Tree</Badge>
### Example 1:
- Input: `root = [3,5,1,6,2,0,8,null,null,7,4], p = 5, q = 1`
- Output: `3`