Skip to content

Commit 1c0b3ff

Browse files
committed
feat: 完善页面功能和UI组件
- 更新页面标题为LeetCode题目格式 - 添加GitHub Star数显示和IndexedDB缓存 - 添加算法思路弹窗组件 - 添加数据输入组件(支持预设值和随机生成) - 添加微信交流群悬浮球 - 改进代码面板支持多语言切换(Java/Python/Go/JS) - 添加键盘快捷键支持(方向键、空格、R键) - 优化播放控制面板UI - 修复TypeScript编译错误
1 parent a4d9840 commit 1c0b3ff

21 files changed

+1746
-581
lines changed

README.md

Lines changed: 14 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,24 @@
1-
# LeetCode 70 - Climbing Stairs
1+
# 70. 爬楼梯 - 算法可视化
22

3-
[在线演示 🔗](https://fuck-algorithm.github.io/leetcode-70-climbing-stairs/)
4-
5-
本项目基于 React + TypeScript + Vite 实现了 LeetCode 第70题 "爬楼梯" 的多种解法,并附带动画可视化演示。
3+
LeetCode 第70题「爬楼梯」的算法可视化演示。
64

75
## 在线演示
86

9-
点击上方链接,即可直接在 GitHub Pages 查看项目效果。
7+
👉 [点击查看在线演示](https://fuck-algorithm.github.io/leetcode-70-climbing-stairs/)
8+
9+
## 题目描述
10+
11+
假设你正在爬楼梯。需要 n 阶你才能到达楼顶。每次你可以爬 1 或 2 个台阶。你有多少种不同的方法可以爬到楼顶呢?
12+
13+
## 包含解法
14+
15+
- 动态规划 - O(n) 时间复杂度
16+
- 矩阵快速幂 - O(log n) 时间复杂度
17+
- 通项公式 - O(1) 时间复杂度
1018

1119
## 本地运行
1220

1321
```bash
14-
git clone https://github.com/fuck-algorithm/leetcode-70-climbing-stairs.git
15-
cd leetcode-70-climbing-stairs
1622
npm install
1723
npm run dev
18-
```
19-
20-
## 构建与部署
21-
22-
```bash
23-
npm run build
24-
npm run deploy
25-
```
24+
```

index.html

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
<!doctype html>
2-
<html lang="en">
2+
<html lang="zh-CN">
33
<head>
44
<meta charset="UTF-8" />
55
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
66
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
7-
<title>Vite + React + TS</title>
7+
<title>70. 爬楼梯 - LeetCode 算法可视化</title>
8+
<meta name="description" content="LeetCode 第70题 爬楼梯问题的算法可视化演示,包含动态规划、矩阵快速幂、通项公式三种解法" />
89
</head>
910
<body>
1011
<div id="root"></div>

package-lock.json

Lines changed: 80 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
},
2828
"devDependencies": {
2929
"@eslint/js": "^9.22.0",
30+
"@playwright/test": "^1.56.1",
3031
"@types/d3": "^7.4.3",
3132
"@types/react": "^19.0.10",
3233
"@types/react-dom": "^19.0.4",

public/wechat-group.png

328 KB
Loading

0 commit comments

Comments
 (0)