Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,17 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Install pnpm
uses: pnpm/action-setup@v2
with:
run_install: true

- name: Setup Node.js
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: 18
node-version: 20
cache: pnpm

- name: Build test
Expand Down
28 changes: 28 additions & 0 deletions .markdownlint-cli2.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
export default {
config: {
default: true,
MD003: {
style: "atx",
},
MD004: {
style: "dash",
},
MD010: false,
MD013: false,
MD024: {
allow_different_nesting: true,
},
MD035: {
style: "---",
},
MD036: false,
MD040: false,
MD045: false,
MD046: false,
},
ignores: [
"**/node_modules/**",
// markdown import demo
"**/*.snippet.md",
],
};
20 changes: 0 additions & 20 deletions .markdownlint.json

This file was deleted.

4 changes: 0 additions & 4 deletions .markdownlintignore

This file was deleted.

6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@

### JVM (必看 :+1:)

JVM 这部分内容主要参考 [JVM 虚拟机规范-Java8 ](https://docs.oracle.com/javase/specs/jvms/se8/html/index.html) 和周志明老师的[《深入理解 Java 虚拟机(第 3 版)》](https://book.douban.com/subject/34907497/) (强烈建议阅读多遍!)。
JVM 这部分内容主要参考 [JVM 虚拟机规范-Java8](https://docs.oracle.com/javase/specs/jvms/se8/html/index.html) 和周志明老师的[《深入理解 Java 虚拟机(第 3 版)》](https://book.douban.com/subject/34907497/) (强烈建议阅读多遍!)。

- **[Java 内存区域](./docs/java/jvm/memory-area.md)**
- **[JVM 垃圾回收](./docs/java/jvm/jvm-garbage-collection.md)**
Expand Down Expand Up @@ -183,8 +183,8 @@ JVM 这部分内容主要参考 [JVM 虚拟机规范-Java8 ](https://docs.oracle

**常见算法问题总结**:

- [几道常见的字符串算法题总结 ](./docs/cs-basics/algorithms/string-algorithm-problems.md)
- [几道常见的链表算法题总结 ](./docs/cs-basics/algorithms/linkedlist-algorithm-problems.md)
- [几道常见的字符串算法题总结](./docs/cs-basics/algorithms/string-algorithm-problems.md)
- [几道常见的链表算法题总结](./docs/cs-basics/algorithms/linkedlist-algorithm-problems.md)
- [剑指 offer 部分编程题](./docs/cs-basics/algorithms/the-sword-refers-to-offer.md)
- [十大经典排序算法](./docs/cs-basics/algorithms/10-classical-sorting-algorithms.md)

Expand Down
33 changes: 0 additions & 33 deletions docs/.vuepress/config.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { defineUserConfig } from "vuepress";
import { searchPlugin } from "@vuepress/plugin-search";
import theme from "./theme.js";

export default defineUserConfig({
Expand Down Expand Up @@ -48,38 +47,6 @@ export default defineUserConfig({

theme,

plugins: [
searchPlugin({
// https://v2.vuepress.vuejs.org/zh/reference/plugin/search.html
// 排除首页
isSearchable: (page) => page.path !== "/",
maxSuggestions: 10,
hotKeys: ["s", "/"],
// 用于在页面的搜索索引中添加额外字段
getExtraFields: () => [],
locales: {
"/": {
placeholder: "搜索",
},
},
}),
// searchProPlugin({
// indexContent: true,
// indexOptions: {
// tokenize: (text, fieldName) =>
// fieldName === "id" ? [text] : cut(text, true),
// },
// customFields: [
// {
// getter: ({ frontmatter }) =>
// <string | undefined>frontmatter.category ?? null,
// formatter: "分类: $content",
// },
// ],
// suggestDelay: 60,
// }),
],

pagePatterns: ["**/*.md", "!**/*.snippet.md", "!.vuepress", "!node_modules"],

shouldPrefetch: false,
Expand Down
5 changes: 5 additions & 0 deletions docs/.vuepress/theme.ts
Original file line number Diff line number Diff line change
Expand Up @@ -87,5 +87,10 @@ export default hopeTheme({
},
tasklist: true,
},

search: {
isSearchable: (page) => page.path !== "/",
maxSuggestions: 10,
},
},
});
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,15 @@ tag:

### LeetCode

455.分发饼干:https://leetcode.cn/problems/assign-cookies/
455.分发饼干:<https://leetcode.cn/problems/assign-cookies/>

121.买卖股票的最佳时机:https://leetcode.cn/problems/best-time-to-buy-and-sell-stock/
121.买卖股票的最佳时机:<https://leetcode.cn/problems/best-time-to-buy-and-sell-stock/>

122.买卖股票的最佳时机 II:https://leetcode.cn/problems/best-time-to-buy-and-sell-stock-ii/
122.买卖股票的最佳时机 II:<https://leetcode.cn/problems/best-time-to-buy-and-sell-stock-ii/>

55.跳跃游戏:https://leetcode.cn/problems/jump-game/
55.跳跃游戏:<https://leetcode.cn/problems/jump-game/>

45.跳跃游戏 II:https://leetcode.cn/problems/jump-game-ii/
45.跳跃游戏 II:<https://leetcode.cn/problems/jump-game-ii/>

## 动态规划

Expand All @@ -48,17 +48,17 @@ tag:

### LeetCode

509.斐波那契数:https://leetcode.cn/problems/fibonacci-number/
509.斐波那契数:<https://leetcode.cn/problems/fibonacci-number/>

746.使用最小花费爬楼梯:https://leetcode.cn/problems/min-cost-climbing-stairs/
746.使用最小花费爬楼梯:<https://leetcode.cn/problems/min-cost-climbing-stairs/>

416.分割等和子集:https://leetcode.cn/problems/partition-equal-subset-sum/
416.分割等和子集:<https://leetcode.cn/problems/partition-equal-subset-sum/>

518.零钱兑换:https://leetcode.cn/problems/coin-change-ii/
518.零钱兑换:<https://leetcode.cn/problems/coin-change-ii/>

647.回文子串:https://leetcode.cn/problems/palindromic-substrings/
647.回文子串:<https://leetcode.cn/problems/palindromic-substrings/>

516.最长回文子序列:https://leetcode.cn/problems/longest-palindromic-subsequence/
516.最长回文子序列:<https://leetcode.cn/problems/longest-palindromic-subsequence/>

## 回溯算法

Expand All @@ -78,17 +78,17 @@ tag:

### leetcode

77.组合:https://leetcode.cn/problems/combinations/
77.组合:<https://leetcode.cn/problems/combinations/>

39.组合总和:https://leetcode.cn/problems/combination-sum/
39.组合总和:<https://leetcode.cn/problems/combination-sum/>

40.组合总和 II:https://leetcode.cn/problems/combination-sum-ii/
40.组合总和 II:<https://leetcode.cn/problems/combination-sum-ii/>

78.子集:https://leetcode.cn/problems/subsets/
78.子集:<https://leetcode.cn/problems/subsets/>

90.子集 II:https://leetcode.cn/problems/subsets-ii/
90.子集 II:<https://leetcode.cn/problems/subsets-ii/>

51.N 皇后:https://leetcode.cn/problems/n-queens/
51.N 皇后:<https://leetcode.cn/problems/n-queens/>

## 分治算法

Expand All @@ -106,9 +106,8 @@ tag:

### LeetCode

108.将有序数组转换成二叉搜索数:https://leetcode.cn/problems/convert-sorted-array-to-binary-search-tree/
108.将有序数组转换成二叉搜索数:<https://leetcode.cn/problems/convert-sorted-array-to-binary-search-tree/>

148.排序列表:https://leetcode.cn/problems/sort-list/

23.合并 k 个升序链表:https://leetcode.cn/problems/merge-k-sorted-lists/
148.排序列表:<https://leetcode.cn/problems/sort-list/>

23.合并 k 个升序链表:<https://leetcode.cn/problems/merge-k-sorted-lists/>
Original file line number Diff line number Diff line change
Expand Up @@ -7,61 +7,58 @@ tag:

## 数组

704.二分查找:https://leetcode.cn/problems/binary-search/
704.二分查找:<https://leetcode.cn/problems/binary-search/>

80.删除有序数组中的重复项 II:https://leetcode.cn/problems/remove-duplicates-from-sorted-array-ii
80.删除有序数组中的重复项 II:<https://leetcode.cn/problems/remove-duplicates-from-sorted-array-ii>

977.有序数组的平方:https://leetcode.cn/problems/squares-of-a-sorted-array/
977.有序数组的平方:<https://leetcode.cn/problems/squares-of-a-sorted-array/>

## 链表

707.设计链表:https://leetcode.cn/problems/design-linked-list/
707.设计链表:<https://leetcode.cn/problems/design-linked-list/>

206.反转链表:https://leetcode.cn/problems/reverse-linked-list/
206.反转链表:<https://leetcode.cn/problems/reverse-linked-list/>

92.反转链表 II:https://leetcode.cn/problems/reverse-linked-list-ii/
92.反转链表 II:<https://leetcode.cn/problems/reverse-linked-list-ii/>

61.旋转链表:https://leetcode.cn/problems/rotate-list/
61.旋转链表:<https://leetcode.cn/problems/rotate-list/>

## 栈与队列

232.用栈实现队列:https://leetcode.cn/problems/implement-queue-using-stacks/
232.用栈实现队列:<https://leetcode.cn/problems/implement-queue-using-stacks/>

225.用队列实现栈:https://leetcode.cn/problems/implement-stack-using-queues/
225.用队列实现栈:<https://leetcode.cn/problems/implement-stack-using-queues/>

347.前 K 个高频元素:https://leetcode.cn/problems/top-k-frequent-elements/
347.前 K 个高频元素:<https://leetcode.cn/problems/top-k-frequent-elements/>

239.滑动窗口最大值:https://leetcode.cn/problems/sliding-window-maximum/
239.滑动窗口最大值:<https://leetcode.cn/problems/sliding-window-maximum/>

## 二叉树

105.从前序与中序遍历构造二叉树:https://leetcode.cn/problems/construct-binary-tree-from-preorder-and-inorder-traversal/
105.从前序与中序遍历构造二叉树:<https://leetcode.cn/problems/construct-binary-tree-from-preorder-and-inorder-traversal/>

117.填充每个节点的下一个右侧节点指针 II:https://leetcode.cn/problems/populating-next-right-pointers-in-each-node-ii
117.填充每个节点的下一个右侧节点指针 II:<https://leetcode.cn/problems/populating-next-right-pointers-in-each-node-ii>

236.二叉树的最近公共祖先:https://leetcode.cn/problems/lowest-common-ancestor-of-a-binary-tree/
236.二叉树的最近公共祖先:<https://leetcode.cn/problems/lowest-common-ancestor-of-a-binary-tree/>

129.求根节点到叶节点数字之和:https://leetcode.cn/problems/sum-root-to-leaf-numbers/
129.求根节点到叶节点数字之和:<https://leetcode.cn/problems/sum-root-to-leaf-numbers/>

102.二叉树的层序遍历:https://leetcode.cn/problems/binary-tree-level-order-traversal/
102.二叉树的层序遍历:<https://leetcode.cn/problems/binary-tree-level-order-traversal/>

530.二叉搜索树的最小绝对差:https://leetcode.cn/problems/minimum-absolute-difference-in-bst/
530.二叉搜索树的最小绝对差:<https://leetcode.cn/problems/minimum-absolute-difference-in-bst/>

## 图

200.岛屿数量:https://leetcode.cn/problems/number-of-islands/
200.岛屿数量:<https://leetcode.cn/problems/number-of-islands/>

207.课程表:https://leetcode.cn/problems/course-schedule/
207.课程表:<https://leetcode.cn/problems/course-schedule/>

210.课程表 II:https://leetcode.cn/problems/course-schedule-ii/
210.课程表 II:<https://leetcode.cn/problems/course-schedule-ii/>

## 堆

215. 数组中的第 K 个最大元素:https://leetcode.cn/problems/kth-largest-element-in-an-array/

215. 数据流的中位数:https://leetcode.cn/problems/find-median-from-data-stream/

215. 前 K 个高频元素:https://leetcode.cn/problems/top-k-frequent-elements/

215.数组中的第 K 个最大元素:<https://leetcode.cn/problems/kth-largest-element-in-an-array/>

216.数据流的中位数:<https://leetcode.cn/problems/find-median-from-data-stream/>

217.前 K 个高频元素:<https://leetcode.cn/problems/top-k-frequent-elements/>
2 changes: 1 addition & 1 deletion docs/cs-basics/algorithms/linkedlist-algorithm-problems.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ tag:

Leetcode 官方详细解答地址:

https://leetcode-cn.com/problems/add-two-numbers/solution/
<https://leetcode-cn.com/problems/add-two-numbers/solution/>

> 要对头结点进行操作时,考虑创建哑节点 dummy,使用 dummy->next 表示真正的头节点。这样可以避免处理头节点为空的边界问题。

Expand Down
Loading