::
Runtime API Examples
This page demonstrates usage of some of the runtime APIs provided by VitePress.
The main useData() API can be used to access site, theme, and page data for the current page. It works in both .md and .vue files:
md
<script setup>
import { useData } from 'vitepress'
const { theme, page, frontmatter } = useData()
</script>
## Results
### Theme Data
<pre>{{ theme }}</pre>
### Page Data
<pre>{{ page }}</pre>
### Page Frontmatter
<pre>{{ frontmatter }}</pre>Results
Theme Data
{
"teekTheme": true,
"vpHome": false,
"windowTransition": true,
"backTop": {
"enabled": true,
"content": "icon"
},
"toComment": {
"enabled": true
},
"codeBlock": {
"enabled": true,
"collapseHeight": 700,
"overlay": true,
"overlayHeight": 400,
"langTextTransform": "uppercase"
},
"banner": {
"enabled": true,
"name": "梦游 笔记",
"bgStyle": "fullImg",
"pureBgColor": "#28282d",
"imgSrc": [
"/img/bg4.png"
],
"imgInterval": 15000,
"imgShuffle": false,
"imgWaves": true,
"mask": true,
"maskBg": "rgba(0, 0, 0, 0.1)",
"textColor": "rgba(168, 255, 75, 0.79)",
"titleFontSize": "3.2rem",
"descFontSize": "1.4rem",
"descStyle": "switch",
"description": [
"理解,成为,超越"
],
"switchTime": 4000,
"switchShuffle": false,
"typesInTime": 200,
"typesOutTime": 100,
"typesNextTime": 800,
"typesShuffle": false
},
"post": {
"postStyle": "list",
"excerptPosition": "top",
"showMore": true,
"moreLabel": "阅读全文 >",
"emptyLabel": "暂无文章",
"coverImgMode": "default",
"showCapture": true,
"splitSeparator": true,
"transition": true,
"transitionName": "tk-slide-fade",
"listStyleTitleTagPosition": "right",
"cardStyleTitleTagPosition": "left",
"defaultCoverImg": []
},
"page": {
"disabled": true,
"pageSize": 20,
"pagerCount": 7,
"layout": "prev, pager, next, jumper, ->, total",
"size": "default",
"background": false,
"hideOnSinglePage": false
},
"homeCardListPosition": "left",
"blogger": {
"name": "天游",
"slogan": "生无涯,学无涯",
"avatar": "/img/avatar.png",
"shape": "circle-rotate",
"circleBgImg": "/img/bg3.png",
"circleBgMask": false,
"circleSize": 100,
"color": "#cf3d02db",
"status": {
"icon": "🙂",
"size": 24,
"title": "平淡"
}
},
"themeEnhance": {
"layoutSwitch": {
"defaultMode": "sidebarWidthAdjustableOnly"
}
},
"logo": "/img/avatar.png",
"nav": [
{
"text": "🏠首页",
"link": "/"
},
{
"text": "💻前端",
"items": [
{
"text": "①前端基础",
"link": "..."
},
{
"text": "②前端进阶",
"link": "..."
},
{
"text": "前端框架Vue",
"link": "/前端/框架篇/VUE/vue"
},
{
"text": "③前端工程化",
"link": "..."
},
{
"text": "④前端性能优化",
"link": "..."
}
]
},
{
"text": "🤖后端",
"items": [
{
"text": "①后端基础",
"link": "..."
},
{
"text": "②后端进阶",
"link": "..."
},
{
"text": "③后端工程化",
"link": "..."
},
{
"text": "④后端性能优化",
"link": "..."
}
]
},
{
"text": "🎤语音",
"link": "/语音/api-examples"
},
{
"text": "📚小说",
"items": [
{
"text": "《梦游记》",
"link": "/小说/梦游记"
},
{
"text": "《长生贼》",
"link": "/小说/长生贼"
},
{
"text": "《度苦记》",
"link": "/小说/度苦记"
},
{
"text": "《火种》",
"link": "/小说/火种"
},
{
"text": "《回魂》",
"link": "/小说/回魂"
},
{
"text": "《三灾》",
"link": "/小说/三灾"
},
{
"text": "《往生》",
"link": "/小说/往生"
},
{
"text": "《盗亦有道》",
"link": "/小说/盗亦有道"
},
{
"text": "《死环》",
"link": "/小说/死环"
}
]
},
{
"text": "🙂面试",
"items": [
{
"text": "HTML",
"link": "/面试/HTML"
},
{
"text": "CSS",
"link": "/面试/CSS"
},
{
"text": "JavaScript",
"link": "/面试/JavaScript"
},
{
"text": "TypeScript",
"link": "/面试/TypeScript"
},
{
"text": "React",
"link": "/面试/React"
},
{
"text": "Next",
"link": "/面试/Next"
},
{
"text": "计网",
"link": "/面试/计网"
},
{
"text": "工程化",
"link": "/面试/工程化"
},
{
"text": "性能优化",
"link": "/面试/性能优化"
},
{
"text": "浏览器原理",
"link": "/面试/浏览器"
},
{
"text": "算法",
"items": [
{
"text": "栈",
"link": "/算法/栈"
},
{
"text": "数组",
"link": "/算法/数组"
},
{
"text": "队列",
"link": "/算法/队列"
},
{
"text": "链表",
"link": "/算法/链表"
},
{
"text": "二树",
"link": "/算法/树"
},
{
"text": "排序",
"link": "/算法/排序"
},
{
"text": "堆",
"link": "/算法/堆"
},
{
"text": "动态规划",
"link": "/算法/动态规划"
},
{
"text": "前端算法",
"link": "/算法/前端算法"
}
]
}
]
}
],
"sidebar": {
"/": [
{
"text": "markdown-examples",
"link": "/markdown-examples"
}
],
"/前端/": [
{
"text": "前端基础",
"collapsed": false,
"items": [
{
"text": "HTML 笔记",
"link": "/前端/基础篇/html.md"
},
{
"text": "CSS 笔记",
"link": "/前端/基础篇/css.md"
},
{
"text": "JavaScript 笔记",
"link": "/前端/基础篇/javascript.md"
}
]
},
{
"text": "前端框架",
"collapsed": true,
"items": [
{
"text": "Vue 笔记",
"link": "/前端/框架篇/VUE/vue"
},
{
"text": "React 笔记",
"link": "/前端/框架篇/react.md"
}
]
},
{
"text": "工程化",
"collapsed": true,
"items": [
{
"text": "Webpack 笔记",
"link": "/前端/工程化/webpack.md"
},
{
"text": "Vite 笔记",
"link": "/前端/工程化/vite.md"
},
{
"text": "ESLint 笔记",
"link": "/前端/工程化/eslint.md"
}
]
}
],
"/后端/": [
{
"text": "后端基础",
"items": [
{
"text": "Node.js 笔记",
"link": "/后端/node.md"
},
{
"text": "NestJS 笔记",
"link": "/后端/nestjs.md"
}
]
}
],
"/小说/": [
{
"text": "",
"items": [
{
"text": "三灾",
"link": "/小说/三灾"
},
{
"text": "回魂",
"link": "/小说/回魂"
},
{
"text": "度苦记",
"link": "/小说/度苦记"
},
{
"text": "梦游记",
"link": "/小说/梦游记"
},
{
"text": "死环",
"link": "/小说/死环"
},
{
"text": "火种",
"link": "/小说/火种"
},
{
"text": "盗亦有道",
"link": "/小说/盗亦有道"
},
{
"text": "返生",
"link": "/小说/返生"
},
{
"text": "长生贼",
"link": "/小说/长生贼"
}
]
}
],
"/算法/": [
{
"text": "算法",
"items": [
{
"text": "数组",
"link": "/算法/数组"
},
{
"text": "链表",
"link": "/算法/链表"
},
{
"text": "二叉树",
"link": "/算法/二叉树"
},
{
"text": "栈",
"link": "/算法/栈"
},
{
"text": "排序",
"link": "/算法/排序"
},
{
"text": "堆",
"link": "/算法/堆"
},
{
"text": "动态规划",
"link": "/算法/动态规划"
},
{
"text": "前端算法",
"link": "/算法/前端算法"
}
]
}
],
"/语音/": [
{
"text": "",
"items": [
{
"text": "api-examples",
"link": "/语音/api-examples"
}
]
}
],
"/面试/": [
{
"text": "面试",
"items": [
{
"text": "HTML",
"link": "/面试/HTML"
},
{
"text": "CSS",
"link": "/面试/CSS"
},
{
"text": "JavaScript",
"link": "/面试/JavaScript"
},
{
"text": "TypeScript",
"link": "/面试/TypeScript"
},
{
"text": "React",
"link": "/面试/React"
},
{
"text": "Next",
"link": "/面试/Next"
},
{
"text": "Nest",
"link": "/面试/Nest"
},
{
"text": "SSE",
"link": "/面试/SSE"
},
{
"text": "工程化",
"link": "/面试/工程化"
},
{
"text": "计网",
"link": "/面试/计网"
},
{
"text": "浏览器",
"link": "/面试/浏览器"
},
{
"text": "前沿技术",
"link": "/面试/前沿技术"
}
]
}
],
"/HTML/": [
{
"text": "HTML",
"items": [
{
"text": "语义化标签",
"link": "/面试/HTML/语义化标签"
},
{
"text": "HTML5新特性",
"link": "/面试/HTML/HTML5新特性"
},
{
"text": "DOM操作",
"link": "/面试/HTML/DOM操作"
},
{
"text": "面试及思路",
"link": "/面试/HTML/高频面试及思路"
}
]
}
],
"/CSS/": [
{
"text": "CSS",
"items": [
{
"text": "盒模型",
"link": "/面试/CSS/盒模型"
},
{
"text": "CSS选择器及优先级",
"link": "/面试/CSS/CSS选择器及优先级"
},
{
"text": "核心布局方案",
"link": "/面试/CSS/核心布局方案"
},
{
"text": "响应式布局",
"link": "/面试/CSS/响应式布局"
},
{
"text": "样式管理及工程化",
"link": "/面试/CSS/样式管理及工程化"
},
{
"text": "高频面试题解析",
"link": "/面试/CSS/高频面试题解析"
}
]
}
]
},
"socialLinks": [
{
"icon": "github",
"link": "https://github.com/settings/profile"
},
{
"icon": "bilibili",
"link": "https://space.bilibili.com/246604314?spm_id_from=333.1007.0.0"
},
{
"icon": "juejin",
"link": "https://juejin.cn/user/2900991440326403"
}
],
"permalinks": {
"map": {},
"inv": {}
},
"docAnalysisInfo": {
"fileList": [
{
"filePath": "/opt/buildhome/repo/docs/markdown-examples.md",
"relativePath": "markdown-examples.md"
},
{
"filePath": "/opt/buildhome/repo/docs/前端/index.md",
"relativePath": "前端/index.md"
},
{
"filePath": "/opt/buildhome/repo/docs/前端/基础篇/index.md",
"relativePath": "前端/基础篇/index.md"
},
{
"filePath": "/opt/buildhome/repo/docs/前端/框架篇/VUE/vue.md",
"relativePath": "前端/框架篇/VUE/vue.md"
},
{
"filePath": "/opt/buildhome/repo/docs/前端/进阶篇/index.md",
"relativePath": "前端/进阶篇/index.md"
},
{
"filePath": "/opt/buildhome/repo/docs/后端/api-examples.md",
"relativePath": "后端/api-examples.md"
},
{
"filePath": "/opt/buildhome/repo/docs/小说/三灾.md",
"relativePath": "小说/三灾.md"
},
{
"filePath": "/opt/buildhome/repo/docs/小说/回魂.md",
"relativePath": "小说/回魂.md"
},
{
"filePath": "/opt/buildhome/repo/docs/小说/度苦记.md",
"relativePath": "小说/度苦记.md"
},
{
"filePath": "/opt/buildhome/repo/docs/小说/梦游记.md",
"relativePath": "小说/梦游记.md"
},
{
"filePath": "/opt/buildhome/repo/docs/小说/死环.md",
"relativePath": "小说/死环.md"
},
{
"filePath": "/opt/buildhome/repo/docs/小说/火种.md",
"relativePath": "小说/火种.md"
},
{
"filePath": "/opt/buildhome/repo/docs/小说/盗亦有道.md",
"relativePath": "小说/盗亦有道.md"
},
{
"filePath": "/opt/buildhome/repo/docs/小说/返生.md",
"relativePath": "小说/返生.md"
},
{
"filePath": "/opt/buildhome/repo/docs/小说/长生贼.md",
"relativePath": "小说/长生贼.md"
},
{
"filePath": "/opt/buildhome/repo/docs/算法/前端算法.md",
"relativePath": "算法/前端算法.md"
},
{
"filePath": "/opt/buildhome/repo/docs/算法/动态规划.md",
"relativePath": "算法/动态规划.md"
},
{
"filePath": "/opt/buildhome/repo/docs/算法/基础.md",
"relativePath": "算法/基础.md"
},
{
"filePath": "/opt/buildhome/repo/docs/算法/堆.md",
"relativePath": "算法/堆.md"
},
{
"filePath": "/opt/buildhome/repo/docs/算法/字典.md",
"relativePath": "算法/字典.md"
},
{
"filePath": "/opt/buildhome/repo/docs/算法/排序.md",
"relativePath": "算法/排序.md"
},
{
"filePath": "/opt/buildhome/repo/docs/算法/数组.md",
"relativePath": "算法/数组.md"
},
{
"filePath": "/opt/buildhome/repo/docs/算法/栈.md",
"relativePath": "算法/栈.md"
},
{
"filePath": "/opt/buildhome/repo/docs/算法/树.md",
"relativePath": "算法/树.md"
},
{
"filePath": "/opt/buildhome/repo/docs/算法/链表.md",
"relativePath": "算法/链表.md"
},
{
"filePath": "/opt/buildhome/repo/docs/算法/队列.md",
"relativePath": "算法/队列.md"
},
{
"filePath": "/opt/buildhome/repo/docs/算法/集合.md",
"relativePath": "算法/集合.md"
},
{
"filePath": "/opt/buildhome/repo/docs/语音/api-examples.md",
"relativePath": "语音/api-examples.md"
},
{
"filePath": "/opt/buildhome/repo/docs/面试/CSS/index.md",
"relativePath": "面试/CSS/index.md"
},
{
"filePath": "/opt/buildhome/repo/docs/面试/HTML/index.md",
"relativePath": "面试/HTML/index.md"
},
{
"filePath": "/opt/buildhome/repo/docs/面试/JavaScript/index.md",
"relativePath": "面试/JavaScript/index.md"
},
{
"filePath": "/opt/buildhome/repo/docs/面试/Nest/index.md",
"relativePath": "面试/Nest/index.md"
},
{
"filePath": "/opt/buildhome/repo/docs/面试/Next/index.md",
"relativePath": "面试/Next/index.md"
},
{
"filePath": "/opt/buildhome/repo/docs/面试/React/index.md",
"relativePath": "面试/React/index.md"
},
{
"filePath": "/opt/buildhome/repo/docs/面试/SSE/index.md",
"relativePath": "面试/SSE/index.md"
},
{
"filePath": "/opt/buildhome/repo/docs/面试/TypeScript/index.md",
"relativePath": "面试/TypeScript/index.md"
},
{
"filePath": "/opt/buildhome/repo/docs/面试/前沿技术/index.md",
"relativePath": "面试/前沿技术/index.md"
},
{
"filePath": "/opt/buildhome/repo/docs/面试/工程化/index.md",
"relativePath": "面试/工程化/index.md"
},
{
"filePath": "/opt/buildhome/repo/docs/面试/性能优化/index.md",
"relativePath": "面试/性能优化/index.md"
},
{
"filePath": "/opt/buildhome/repo/docs/面试/浏览器/index.md",
"relativePath": "面试/浏览器/index.md"
},
{
"filePath": "/opt/buildhome/repo/docs/面试/计网/index.md",
"relativePath": "面试/计网/index.md"
}
],
"totalFileWords": 9032,
"eachFileWords": [
{
"fileInfo": {
"filePath": "/opt/buildhome/repo/docs/markdown-examples.md",
"relativePath": "markdown-examples.md"
},
"wordCount": 133,
"readingTime": "1m",
"frontmatter": {}
},
{
"fileInfo": {
"filePath": "/opt/buildhome/repo/docs/前端/index.md",
"relativePath": "前端/index.md"
},
"wordCount": 119,
"readingTime": "1m",
"frontmatter": {
"outline": "deep"
}
},
{
"fileInfo": {
"filePath": "/opt/buildhome/repo/docs/前端/基础篇/index.md",
"relativePath": "前端/基础篇/index.md"
},
"wordCount": 69,
"readingTime": "1m",
"frontmatter": {
"outline": "deep"
}
},
{
"fileInfo": {
"filePath": "/opt/buildhome/repo/docs/前端/框架篇/VUE/vue.md",
"relativePath": "前端/框架篇/VUE/vue.md"
},
"wordCount": 1629,
"readingTime": "7m",
"frontmatter": {
"outline": "deep"
}
},
{
"fileInfo": {
"filePath": "/opt/buildhome/repo/docs/前端/进阶篇/index.md",
"relativePath": "前端/进阶篇/index.md"
},
"wordCount": 88,
"readingTime": "1m",
"frontmatter": {
"outline": "deep"
}
},
{
"fileInfo": {
"filePath": "/opt/buildhome/repo/docs/后端/api-examples.md",
"relativePath": "后端/api-examples.md"
},
"wordCount": 119,
"readingTime": "1m",
"frontmatter": {
"outline": "deep"
}
},
{
"fileInfo": {
"filePath": "/opt/buildhome/repo/docs/小说/三灾.md",
"relativePath": "小说/三灾.md"
},
"wordCount": 0,
"readingTime": "1m",
"frontmatter": {}
},
{
"fileInfo": {
"filePath": "/opt/buildhome/repo/docs/小说/回魂.md",
"relativePath": "小说/回魂.md"
},
"wordCount": 0,
"readingTime": "1m",
"frontmatter": {}
},
{
"fileInfo": {
"filePath": "/opt/buildhome/repo/docs/小说/度苦记.md",
"relativePath": "小说/度苦记.md"
},
"wordCount": 0,
"readingTime": "1m",
"frontmatter": {}
},
{
"fileInfo": {
"filePath": "/opt/buildhome/repo/docs/小说/梦游记.md",
"relativePath": "小说/梦游记.md"
},
"wordCount": 119,
"readingTime": "1m",
"frontmatter": {
"outline": "deep"
}
},
{
"fileInfo": {
"filePath": "/opt/buildhome/repo/docs/小说/死环.md",
"relativePath": "小说/死环.md"
},
"wordCount": 0,
"readingTime": "1m",
"frontmatter": {}
},
{
"fileInfo": {
"filePath": "/opt/buildhome/repo/docs/小说/火种.md",
"relativePath": "小说/火种.md"
},
"wordCount": 0,
"readingTime": "1m",
"frontmatter": {}
},
{
"fileInfo": {
"filePath": "/opt/buildhome/repo/docs/小说/盗亦有道.md",
"relativePath": "小说/盗亦有道.md"
},
"wordCount": 0,
"readingTime": "1m",
"frontmatter": {}
},
{
"fileInfo": {
"filePath": "/opt/buildhome/repo/docs/小说/返生.md",
"relativePath": "小说/返生.md"
},
"wordCount": 0,
"readingTime": "1m",
"frontmatter": {}
},
{
"fileInfo": {
"filePath": "/opt/buildhome/repo/docs/小说/长生贼.md",
"relativePath": "小说/长生贼.md"
},
"wordCount": 0,
"readingTime": "1m",
"frontmatter": {}
},
{
"fileInfo": {
"filePath": "/opt/buildhome/repo/docs/算法/前端算法.md",
"relativePath": "算法/前端算法.md"
},
"wordCount": 237,
"readingTime": "1m",
"frontmatter": {
"outline": "deep"
}
},
{
"fileInfo": {
"filePath": "/opt/buildhome/repo/docs/算法/动态规划.md",
"relativePath": "算法/动态规划.md"
},
"wordCount": 115,
"readingTime": "1m",
"frontmatter": {
"outline": "deep"
}
},
{
"fileInfo": {
"filePath": "/opt/buildhome/repo/docs/算法/基础.md",
"relativePath": "算法/基础.md"
},
"wordCount": 101,
"readingTime": "1m",
"frontmatter": {
"outline": "deep"
}
},
{
"fileInfo": {
"filePath": "/opt/buildhome/repo/docs/算法/堆.md",
"relativePath": "算法/堆.md"
},
"wordCount": 115,
"readingTime": "1m",
"frontmatter": {
"outline": "deep"
}
},
{
"fileInfo": {
"filePath": "/opt/buildhome/repo/docs/算法/字典.md",
"relativePath": "算法/字典.md"
},
"wordCount": 1401,
"readingTime": "6.1m",
"frontmatter": {
"outline": "deep"
}
},
{
"fileInfo": {
"filePath": "/opt/buildhome/repo/docs/算法/排序.md",
"relativePath": "算法/排序.md"
},
"wordCount": 610,
"readingTime": "2.5m",
"frontmatter": {
"outline": "deep"
}
},
{
"fileInfo": {
"filePath": "/opt/buildhome/repo/docs/算法/数组.md",
"relativePath": "算法/数组.md"
},
"wordCount": 115,
"readingTime": "1m",
"frontmatter": {
"outline": "deep"
}
},
{
"fileInfo": {
"filePath": "/opt/buildhome/repo/docs/算法/栈.md",
"relativePath": "算法/栈.md"
},
"wordCount": 167,
"readingTime": "1m",
"frontmatter": {
"outline": "deep"
}
},
{
"fileInfo": {
"filePath": "/opt/buildhome/repo/docs/算法/树.md",
"relativePath": "算法/树.md"
},
"wordCount": 658,
"readingTime": "3m",
"frontmatter": {
"outline": "deep"
}
},
{
"fileInfo": {
"filePath": "/opt/buildhome/repo/docs/算法/链表.md",
"relativePath": "算法/链表.md"
},
"wordCount": 751,
"readingTime": "3.4m",
"frontmatter": {
"outline": "deep"
}
},
{
"fileInfo": {
"filePath": "/opt/buildhome/repo/docs/算法/队列.md",
"relativePath": "算法/队列.md"
},
"wordCount": 172,
"readingTime": "1m",
"frontmatter": {
"outline": "deep"
}
},
{
"fileInfo": {
"filePath": "/opt/buildhome/repo/docs/算法/集合.md",
"relativePath": "算法/集合.md"
},
"wordCount": 466,
"readingTime": "2.2m",
"frontmatter": {
"outline": "deep"
}
},
{
"fileInfo": {
"filePath": "/opt/buildhome/repo/docs/语音/api-examples.md",
"relativePath": "语音/api-examples.md"
},
"wordCount": 119,
"readingTime": "1m",
"frontmatter": {
"outline": "deep"
}
},
{
"fileInfo": {
"filePath": "/opt/buildhome/repo/docs/面试/CSS/index.md",
"relativePath": "面试/CSS/index.md"
},
"wordCount": 198,
"readingTime": "1m",
"frontmatter": {
"outline": "deep"
}
},
{
"fileInfo": {
"filePath": "/opt/buildhome/repo/docs/面试/HTML/index.md",
"relativePath": "面试/HTML/index.md"
},
"wordCount": 128,
"readingTime": "1m",
"frontmatter": {
"outline": "deep"
}
},
{
"fileInfo": {
"filePath": "/opt/buildhome/repo/docs/面试/JavaScript/index.md",
"relativePath": "面试/JavaScript/index.md"
},
"wordCount": 152,
"readingTime": "1m",
"frontmatter": {
"outline": "deep"
}
},
{
"fileInfo": {
"filePath": "/opt/buildhome/repo/docs/面试/Nest/index.md",
"relativePath": "面试/Nest/index.md"
},
"wordCount": 83,
"readingTime": "1m",
"frontmatter": {
"outline": "deep"
}
},
{
"fileInfo": {
"filePath": "/opt/buildhome/repo/docs/面试/Next/index.md",
"relativePath": "面试/Next/index.md"
},
"wordCount": 75,
"readingTime": "1m",
"frontmatter": {
"outline": "deep"
}
},
{
"fileInfo": {
"filePath": "/opt/buildhome/repo/docs/面试/React/index.md",
"relativePath": "面试/React/index.md"
},
"wordCount": 185,
"readingTime": "1m",
"frontmatter": {
"outline": "deep"
}
},
{
"fileInfo": {
"filePath": "/opt/buildhome/repo/docs/面试/SSE/index.md",
"relativePath": "面试/SSE/index.md"
},
"wordCount": 87,
"readingTime": "1m",
"frontmatter": {
"outline": "deep"
}
},
{
"fileInfo": {
"filePath": "/opt/buildhome/repo/docs/面试/TypeScript/index.md",
"relativePath": "面试/TypeScript/index.md"
},
"wordCount": 196,
"readingTime": "1m",
"frontmatter": {
"outline": "deep"
}
},
{
"fileInfo": {
"filePath": "/opt/buildhome/repo/docs/面试/前沿技术/index.md",
"relativePath": "面试/前沿技术/index.md"
},
"wordCount": 96,
"readingTime": "1m",
"frontmatter": {
"outline": "deep"
}
},
{
"fileInfo": {
"filePath": "/opt/buildhome/repo/docs/面试/工程化/index.md",
"relativePath": "面试/工程化/index.md"
},
"wordCount": 157,
"readingTime": "1m",
"frontmatter": {
"outline": "deep"
}
},
{
"fileInfo": {
"filePath": "/opt/buildhome/repo/docs/面试/性能优化/index.md",
"relativePath": "面试/性能优化/index.md"
},
"wordCount": 83,
"readingTime": "1m",
"frontmatter": {
"outline": "deep"
}
},
{
"fileInfo": {
"filePath": "/opt/buildhome/repo/docs/面试/浏览器/index.md",
"relativePath": "面试/浏览器/index.md"
},
"wordCount": 118,
"readingTime": "1m",
"frontmatter": {
"outline": "deep"
}
},
{
"fileInfo": {
"filePath": "/opt/buildhome/repo/docs/面试/计网/index.md",
"relativePath": "面试/计网/index.md"
},
"wordCount": 171,
"readingTime": "1m",
"frontmatter": {
"outline": "deep"
}
}
],
"lastCommitTime": "2025-12-13 22:50:57"
},
"catalogues": {
"arr": [],
"map": {},
"inv": {}
},
"posts": {
"allPosts": [
{
"url": "/",
"relativePath": "/",
"frontmatter": {
"layout": "home",
"hero": {
"name": "天游笔记",
"text": "学无涯矣",
"tagline": "记录路上的每一张风景",
"actions": [
{
"theme": "brand",
"text": "开始学习🧐",
"link": "/api-examples"
},
{
"theme": "alt",
"text": "分类合集📚",
"link": "/api-examples"
},
{
"theme": "alt",
"text": "面试题汇总👀",
"link": "/api-examples"
}
]
},
"features": [
{
"title": "前端💻",
"details": "HTML、CSS、JavaScript、TypeScript、React、Vite、性能优化、工程化"
},
{
"title": "语音🎤",
"details": "音频提取、特征提取、WebRTC、Nodejs、实时传输与识别"
},
{
"title": "面试📦",
"details": "前端基础、网络、算法、项目"
}
]
},
"title": "",
"date": "1970-01-01 00:00:00",
"capture": ""
},
{
"url": "/markdown-examples.html",
"relativePath": "/markdown-examples.html",
"frontmatter": {},
"title": "Markdown Extension Examples",
"date": "1970-01-01 00:00:00",
"capture": "This page demonstrates some of the built-in markdown extensions provided by VitePress.\n Syntax Highlighting\nVitePress provides Syntax Highlighting powered by Shiki, with additional features like line-highlighting:\nInput\n````md\n```js{4}\nexport default {\n data () {\n return {\n msg: 'Highlighte"
},
{
"url": "/前端/",
"relativePath": "/前端/",
"frontmatter": {
"outline": "deep"
},
"title": "Runtime API Examples",
"date": "1970-01-01 00:00:00",
"capture": "Runtime API Examples\nThis page demonstrates usage of some of the runtime APIs provided by VitePress.\nThe main `useData()` API can be used to access site, theme, and page data for the current page. It works in both `.md` and `.vue` files:\n```md\n<script setup\nimport { useData } from 'vitepress'\ncon"
},
{
"url": "/前端/基础篇/",
"relativePath": "/前端/基础篇/",
"frontmatter": {
"outline": "deep"
},
"title": "工程化高频面试题",
"date": "1970-01-01 00:00:00",
"capture": "工程化高频面试题\nThis page demonstrates usage of some of the runtime APIs provided by VitePress.\nThe main `useData()` API can be used to access site, theme, and page data for the current page. It works in both `.md` and `.vue` files:\n```md\n```\n HTML\n CSS\n JS\nCheck out the documentation for the full list of "
},
{
"url": "/前端/框架篇/VUE/vue.html",
"relativePath": "/前端/框架篇/VUE/vue.html",
"frontmatter": {
"outline": "deep"
},
"title": "Vue",
"date": "1970-01-01 00:00:00",
"capture": "Vue\n 引入Vue\n```\n<script src=\"https://cdn.jsdelivr.net/npm/vue@2.7.16/dist/vue.js\"\n```\n 具体结构\n``` 页面结构\n<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n <meta charset=\"UTF-8\">\n <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\n <title>Document"
},
{
"url": "/前端/进阶篇/",
"relativePath": "/前端/进阶篇/",
"frontmatter": {
"outline": "deep"
},
"title": "工程化高频面试题",
"date": "1970-01-01 00:00:00",
"capture": "工程化高频面试题\nThis page demonstrates usage of some of the runtime APIs provided by VitePress.\nThe main `useData()` API can be used to access site, theme, and page data for the current page. It works in both `.md` and `.vue` files:\n```md\n```\n TS\n Webpack\n Vite\n Vue\n React\n Nodejs/Express/Fastify\n Nuxt.JS\n"
},
{
"url": "/后端/api-examples.html",
"relativePath": "/后端/api-examples.html",
"frontmatter": {
"outline": "deep"
},
"title": "Runtime API Examples",
"date": "1970-01-01 00:00:00",
"capture": "Runtime API Examples\nThis page demonstrates usage of some of the runtime APIs provided by VitePress.\nThe main `useData()` API can be used to access site, theme, and page data for the current page. It works in both `.md` and `.vue` files:\n```md\n<script setup\nimport { useData } from 'vitepress'\ncon"
},
{
"url": "/小说/三灾.html",
"relativePath": "/小说/三灾.html",
"frontmatter": {},
"title": "html",
"date": "1970-01-01 00:00:00",
"capture": ""
},
{
"url": "/小说/回魂.html",
"relativePath": "/小说/回魂.html",
"frontmatter": {},
"title": "html",
"date": "1970-01-01 00:00:00",
"capture": ""
},
{
"url": "/小说/度苦记.html",
"relativePath": "/小说/度苦记.html",
"frontmatter": {},
"title": "html",
"date": "1970-01-01 00:00:00",
"capture": ""
},
{
"url": "/小说/梦游记.html",
"relativePath": "/小说/梦游记.html",
"frontmatter": {
"outline": "deep"
},
"title": "Runtime API Examples",
"date": "1970-01-01 00:00:00",
"capture": "Runtime API Examples\nThis page demonstrates usage of some of the runtime APIs provided by VitePress.\nThe main `useData()` API can be used to access site, theme, and page data for the current page. It works in both `.md` and `.vue` files:\n```md\n<script setup\nimport { useData } from 'vitepress'\ncon"
},
{
"url": "/小说/死环.html",
"relativePath": "/小说/死环.html",
"frontmatter": {},
"title": "html",
"date": "1970-01-01 00:00:00",
"capture": ""
},
{
"url": "/小说/火种.html",
"relativePath": "/小说/火种.html",
"frontmatter": {},
"title": "html",
"date": "1970-01-01 00:00:00",
"capture": ""
},
{
"url": "/小说/盗亦有道.html",
"relativePath": "/小说/盗亦有道.html",
"frontmatter": {},
"title": "html",
"date": "1970-01-01 00:00:00",
"capture": ""
},
{
"url": "/小说/返生.html",
"relativePath": "/小说/返生.html",
"frontmatter": {},
"title": "html",
"date": "1970-01-01 00:00:00",
"capture": ""
},
{
"url": "/小说/长生贼.html",
"relativePath": "/小说/长生贼.html",
"frontmatter": {},
"title": "html",
"date": "1970-01-01 00:00:00",
"capture": ""
},
{
"url": "/算法/前端算法.html",
"relativePath": "/算法/前端算法.html",
"frontmatter": {
"outline": "deep"
},
"title": "链表",
"date": "1970-01-01 00:00:00",
"capture": "链表\n 反转链表\n<pre\n<pre>输入:head头节点</pre>\n<pre>输出:反转后新头节点</pre>\n 思路及代码\n<pre>思路:记录,反转\n给前任赋null,现任是头节点\n然后还有现任的时候,先把下任存好(const next = curr.next)\n让现任的next指针去找前任,即 curr.next = prev\n把前任换成现任, prev = curr\n把现任换成下一任, curr = next\n</pre>\n``` JS\nfunction reverseList(head){ //传入头"
},
{
"url": "/算法/动态规划.html",
"relativePath": "/算法/动态规划.html",
"frontmatter": {
"outline": "deep"
},
"title": "寻找第K大",
"date": "1970-01-01 00:00:00",
"capture": "寻找第K大\n思路: 分治思想,及快速选择算法或者使用小栈堆,即维护K个元素,堆顶为第K大\n```md\n<script setup\nimport { useData } from 'vitepress'\nconst { theme, page, frontmatter } = useData()\n</script>\n Results\n Theme Data\n<pre>{{ theme }}</pre>\n Page Data\n<pre>{{ page }}</pre>\n Page Frontmatter\n<pre>{{ "
},
{
"url": "/算法/基础.html",
"relativePath": "/算法/基础.html",
"frontmatter": {
"outline": "deep"
},
"title": "算法基础",
"date": "1970-01-01 00:00:00",
"capture": "算法基础 \n```md\n```\n 数据结构\n 栈、队列、链表\n 集合、字典\n 树、堆、图\n 链表\n 遍历链表、删除链表节点\n 树、图\n 深度/广度优先遍历\n 数组\n 冒泡/选择/插入/归并/快速排序、顺序/二分搜索\n 时间复杂度\n 空间复杂度\n 常见 O(1) O(logN) O(N) O(N²) \nCheck out the documentation for the full list of runtime APIs."
},
{
"url": "/算法/堆.html",
"relativePath": "/算法/堆.html",
"frontmatter": {
"outline": "deep"
},
"title": "寻找第K大",
"date": "1970-01-01 00:00:00",
"capture": "寻找第K大\n思路: 分治思想,及快速选择算法或者使用小栈堆,即维护K个元素,堆顶为第K大\n```md\n<script setup\nimport { useData } from 'vitepress'\nconst { theme, page, frontmatter } = useData()\n</script>\n Results\n Theme Data\n<pre>{{ theme }}</pre>\n Page Data\n<pre>{{ page }}</pre>\n Page Frontmatter\n<pre>{{ "
},
{
"url": "/算法/字典.html",
"relativePath": "/算法/字典.html",
"frontmatter": {
"outline": "deep"
},
"title": "字典",
"date": "1970-01-01 00:00:00",
"capture": "字典\n 字典特性\n<pre\n与集合类似,字典也是一种存储唯一值的数据结构,但是是以键值对的形式来存储\nES6中的字典叫做Map\n</pre>\n```md\nconst m = new Map()\n//增 m.set()\nm.set('a','aa');\n//删 m.delete()\nm.set('b','bb')\nm.delete('b')\n//清空所有\nm.clear()\n//改\nm.set('a','aaa') //直接覆盖就行\n//查 m.get() get拿到的值\n```\n 两个数组的交集 LC349\n<pre>\n给定两个数组,编写一个函数来求出他们的交"
},
{
"url": "/算法/排序.html",
"relativePath": "/算法/排序.html",
"frontmatter": {
"outline": "deep"
},
"title": "寻找第K大",
"date": "1970-01-01 00:00:00",
"capture": "寻找第K大\n<pre\n<pre>输入:数组及数字k</pre>\n<pre>输出:第k大的数</pre>\n<pre>思路:nums是一个数组,我们可以先找k对应数的索引,即排序过后数的对应索引\n随后,我们通过快速选择配合分区来进行筛选\n首先确定left和right,partition中进行判断,可以以right为基准\n然后让j等于左边界,开始循环,每次增加时判断与right的大小\n当j对应的值小于基准值,则让其放到左区中,逻辑是 [num[i++],num[j]] = [num[j],num[i]]\n第一轮实际上i=j,i++是控"
},
{
"url": "/算法/数组.html",
"relativePath": "/算法/数组.html",
"frontmatter": {
"outline": "deep"
},
"title": "寻找第K大",
"date": "1970-01-01 00:00:00",
"capture": "寻找第K大\n思路: 分治思想,及快速选择算法或者使用小栈堆,即维护K个元素,堆顶为第K大\n```md\n<script setup\nimport { useData } from 'vitepress'\nconst { theme, page, frontmatter } = useData()\n</script>\n Results\n Theme Data\n<pre>{{ theme }}</pre>\n Page Data\n<pre>{{ page }}</pre>\n Page Frontmatter\n<pre>{{ "
},
{
"url": "/算法/栈.html",
"relativePath": "/算法/栈.html",
"frontmatter": {
"outline": "deep"
},
"title": "栈",
"date": "1970-01-01 00:00:00",
"capture": "栈\n ·栈是一个后进先出的数据结构\n ·JS中没有栈,但可以用Array实现栈的所有功能\n ·栈常用操作:push/pop/stack[stack.length-1]\n```md\n```\n 有效的括号(纯栈)\n 对于没有闭合的左括号,越靠后的左括号,其对应右括号越靠前\n```md\nfunction isvaild (s){\n if(s.length % 2 === 1) return false\n const stack = []\n for(let i =0;i<s.length ;i++){\n const c = s[i]\n if(c ="
},
{
"url": "/算法/树.html",
"relativePath": "/算法/树.html",
"frontmatter": {
"outline": "deep"
},
"title": "树",
"date": "1970-01-01 00:00:00",
"capture": "树\n<pre\n树是一种分层数据的抽象模型\n</pre>\n<pre>\n前端中常见的树包括:\nDOM树/级联选择/树形控件 \n</pre>\n<pre>\nJS中没有树,但是可以用Object和Array构建树\n树的常用操作:\n深度/广度优先遍历\n前中后序遍历\n</pre>\n<pre></pre>\n```\n```\n 深度/广度优先遍历\n 深度优先遍历\n<pre>\n尽可能深的搜索树的分支\n</pre>\n<pre>\n算法口诀:\n访问根节点\n对根节点的children挨个进行深度优先"
},
{
"url": "/算法/链表.html",
"relativePath": "/算法/链表.html",
"frontmatter": {
"outline": "deep"
},
"title": "链表",
"date": "1970-01-01 00:00:00",
"capture": "链表\n 链表是多个元素组成的列表\n 元素存储不连续,用next指针连在一起\n 遍历链表\n``` md\n let p = a;\n while(p){\n console.log(p.val)\n p = p.next\n }\n```\n 插入\n``` md\nconst e = {val:'e'}\nc.next = e;\ne.next = d;\n```\n 删除\n```\nc.next = d\n```\n 删除链表中的节点LC237\n 要求:请编写函数,使其可以删除某个链表中给定的非末尾节点,将只被给定要求被删除的节点\n 现有链表 -- head = [4,5,1,9] \n```\nfunctio"
},
{
"url": "/算法/队列.html",
"relativePath": "/算法/队列.html",
"frontmatter": {
"outline": "deep"
},
"title": "栈",
"date": "1970-01-01 00:00:00",
"capture": "栈\n ·栈是一个先进先出的数据结构\n ·JS中没有队列,但可以用Array实现队列的所有功能\n ·栈常用操作:push/shift/queue[queue.length-1]\n 使用场景\n 食堂排队打饭\n JS异步中的任务队列\n 计算最近请求次数\n 计算最近请求次数(LC933)\n 输入: input = [[],[1],[100],[3001],[3002]]\n 输出: [null,1,2,3,3]\n 解题步骤:新请求入队,3000ms 前发出的请求出队,队列长度即最近请求次数\n```md\nvar RecentCounter = function(){\n this.q = []\n}\nR"
},
{
"url": "/算法/集合.html",
"relativePath": "/算法/集合.html",
"frontmatter": {
"outline": "deep"
},
"title": "集合",
"date": "1970-01-01 00:00:00",
"capture": "集合\n 集合特性\n<pre\n一种无序且唯一的数据结构\nES6中有集合,名为Set\n常规操作:\n去重\n判断某元素是否在集合中,求交集\n</pre>\n```md\n//去重\nconst arr = [1,1,2,2];\nconst arr2 = [...new Set(arr)];\n//判断元素是否在集合中\nconst set = new Set(arr)\nconst has = set.has(1) //结果是boolean\n//求交集\nconst set2 = new Set([2,3]);\nconst set3 = new Set([...set].filter(ite"
},
{
"url": "/语音/api-examples.html",
"relativePath": "/语音/api-examples.html",
"frontmatter": {
"outline": "deep"
},
"title": "Runtime API Examples",
"date": "1970-01-01 00:00:00",
"capture": "Runtime API Examples\nThis page demonstrates usage of some of the runtime APIs provided by VitePress.\nThe main `useData()` API can be used to access site, theme, and page data for the current page. It works in both `.md` and `.vue` files:\n```md\n<script setup\nimport { useData } from 'vitepress'\ncon"
},
{
"url": "/面试/CSS/",
"relativePath": "/面试/CSS/",
"frontmatter": {
"outline": "deep"
},
"title": "CSS高频面试题",
"date": "1970-01-01 00:00:00",
"capture": "CSS高频面试题\nThis page demonstrates usage of some of the runtime APIs provided by VitePress.\nThe main `useData()` API can be used to access site, theme, and page data for the current page. It works in both `.md` and `.vue` files:\n```md\n```\n BFC的意义与用法\n Theme Data\n Page Data\n Page Frontmatter\n 常见布局方案及定位方式"
},
{
"url": "/面试/HTML/",
"relativePath": "/面试/HTML/",
"frontmatter": {
"outline": "deep"
},
"title": "HTML高频面试题",
"date": "1970-01-01 00:00:00",
"capture": "HTML高频面试题\nThis page demonstrates usage of some of the runtime APIs provided by VitePress.\nThe main `useData()` API can be used to access site, theme, and page data for the current page. It works in both `.md` and `.vue` files:\n```md\n```\n HTML语义化标签\n Theme Data\n Page Data\n Page Frontmatter\n HTML结构\n HT"
},
{
"url": "/面试/JavaScript/",
"relativePath": "/面试/JavaScript/",
"frontmatter": {
"outline": "deep"
},
"title": "JavaScript高频面试题",
"date": "1970-01-01 00:00:00",
"capture": "JavaScript高频面试题\nThis page demonstrates usage of some of the runtime APIs provided by VitePress.\nThe main `useData()` API can be used to access site, theme, and page data for the current page. It works in both `.md` and `.vue` files:\n```md\n```\n ES6+新特性\n Theme Data\n Page Data\n Page Frontmatter\n 闭包\n JS"
},
{
"url": "/面试/Nest/",
"relativePath": "/面试/Nest/",
"frontmatter": {
"outline": "deep"
},
"title": "工程化高频面试题",
"date": "1970-01-01 00:00:00",
"capture": "工程化高频面试题\nThis page demonstrates usage of some of the runtime APIs provided by VitePress.\nThe main `useData()` API can be used to access site, theme, and page data for the current page. It works in both `.md` and `.vue` files:\n```md\n```\n NestJS的底层原理\n IOC\n 依赖注入\n NestJS Module\n NestJS Controller\n NestJ"
},
{
"url": "/面试/Next/",
"relativePath": "/面试/Next/",
"frontmatter": {
"outline": "deep"
},
"title": "Nextjs 面试题",
"date": "1970-01-01 00:00:00",
"capture": "```md\n```\n Nextjs的优点\n Nextjs路由\n 文件夹路由\n 嵌套路由\n Nextjs优化\n 路由懒加载\n 图片懒加载\n 组件懒加载\n Nextjs 水合\n Nextjs 渲染\n SSR的实现\n SSG的实现\n CSR的实现\nCheck out the documentation for the full list of runtime APIs."
},
{
"url": "/面试/React/",
"relativePath": "/面试/React/",
"frontmatter": {
"outline": "deep"
},
"title": "React高频面试题",
"date": "1970-01-01 00:00:00",
"capture": "React高频面试题\nThis page demonstrates usage of some of the runtime APIs provided by VitePress.\nThe main `useData()` API can be used to access site, theme, and page data for the current page. It works in both `.md` and `.vue` files:\n```md\n```\n 虚拟DOM与Diff算法\n Diff算法的优化策略\n Theme Data\n<pre\n Page Data\n<"
},
{
"url": "/面试/SSE/",
"relativePath": "/面试/SSE/",
"frontmatter": {
"outline": "deep"
},
"title": "SSE流式输出",
"date": "1970-01-01 00:00:00",
"capture": "SSE流式输出\nThis page demonstrates usage of some of the runtime APIs provided by VitePress.\nThe main `useData()` API can be used to access site, theme, and page data for the current page. It works in both `.md` and `.vue` files:\n```md\n```\n SSE流式输出的概念\n SSE流式输出的原理\n SSE流式输出的实现\nCheck out the documentation f"
},
{
"url": "/面试/TypeScript/",
"relativePath": "/面试/TypeScript/",
"frontmatter": {
"outline": "deep"
},
"title": "TS面试题",
"date": "1970-01-01 00:00:00",
"capture": "TS面试题\nThis page demonstrates usage of some of the runtime APIs provided by VitePress.\nThe main `useData()` API can be used to access site, theme, and page data for the current page. It works in both `.md` and `.vue` files:\n```md\n```\n TS在项目中的使用\n Theme Data\n Page Data\n Page Frontmatter\n Interface和type"
},
{
"url": "/面试/前沿技术/",
"relativePath": "/面试/前沿技术/",
"frontmatter": {
"outline": "deep"
},
"title": "前沿技术面试题",
"date": "1970-01-01 00:00:00",
"capture": "前沿技术面试题\nThis page demonstrates usage of some of the runtime APIs provided by VitePress.\nThe main `useData()` API can be used to access site, theme, and page data for the current page. It works in both `.md` and `.vue` files:\n```md\n```\n WebAssembly\n 微前端\n 常用的微前端框架\n React Native /小程序开发\n AI大模型在前端的应用场景\nC"
},
{
"url": "/面试/工程化/",
"relativePath": "/面试/工程化/",
"frontmatter": {
"outline": "deep"
},
"title": "工程化高频面试题",
"date": "1970-01-01 00:00:00",
"capture": "工程化高频面试题\nThis page demonstrates usage of some of the runtime APIs provided by VitePress.\nThe main `useData()` API can be used to access site, theme, and page data for the current page. It works in both `.md` and `.vue` files:\n```md\n```\n Webpack\n loader和plugin的区别\n 自定义loader/plugin\n Vite\n Vite的热更新原理\n "
},
{
"url": "/面试/性能优化/",
"relativePath": "/面试/性能优化/",
"frontmatter": {
"outline": "deep"
},
"title": "性能优化面试题",
"date": "1970-01-01 00:00:00",
"capture": "性能优化面试题\nThis page demonstrates usage of some of the runtime APIs provided by VitePress.\nThe main `useData()` API can be used to access site, theme, and page data for the current page. It works in both `.md` and `.vue` files:\n```md\n```\n 代码优化\n 静态资源优化\n 组件优化\n 缓存优化\nCheck out the documentation for the"
},
{
"url": "/面试/浏览器/",
"relativePath": "/面试/浏览器/",
"frontmatter": {
"outline": "deep"
},
"title": "浏览器高频面试题",
"date": "1970-01-01 00:00:00",
"capture": "浏览器高频面试题\nThis page demonstrates usage of some of the runtime APIs provided by VitePress.\nThe main `useData()` API can be used to access site, theme, and page data for the current page. It works in both `.md` and `.vue` files:\n```md\n```\n 浏览器的垃圾回收机制\n 浏览器渲染流程\n 浏览器同源策略\n 浏览器性能指标\n Service Worker\n 如何实现 PWA"
},
{
"url": "/面试/计网/",
"relativePath": "/面试/计网/",
"frontmatter": {
"outline": "deep"
},
"title": "计网高频面试题",
"date": "1970-01-01 00:00:00",
"capture": "计网高频面试题\nThis page demonstrates usage of some of the runtime APIs provided by VitePress.\nThe main `useData()` API can be used to access site, theme, and page data for the current page. It works in both `.md` and `.vue` files:\n```md\n```\n 常见的网络攻击\n XSS\n CRSF\n Theme Data\n<pre\n Page Data\n<pre>{{ "
}
],
"originPosts": [
{
"url": "/markdown-examples.html",
"relativePath": "/markdown-examples.html",
"frontmatter": {},
"title": "Markdown Extension Examples",
"date": "1970-01-01 00:00:00",
"capture": "This page demonstrates some of the built-in markdown extensions provided by VitePress.\n Syntax Highlighting\nVitePress provides Syntax Highlighting powered by Shiki, with additional features like line-highlighting:\nInput\n````md\n```js{4}\nexport default {\n data () {\n return {\n msg: 'Highlighte"
},
{
"url": "/前端/",
"relativePath": "/前端/",
"frontmatter": {
"outline": "deep"
},
"title": "Runtime API Examples",
"date": "1970-01-01 00:00:00",
"capture": "Runtime API Examples\nThis page demonstrates usage of some of the runtime APIs provided by VitePress.\nThe main `useData()` API can be used to access site, theme, and page data for the current page. It works in both `.md` and `.vue` files:\n```md\n<script setup\nimport { useData } from 'vitepress'\ncon"
},
{
"url": "/前端/基础篇/",
"relativePath": "/前端/基础篇/",
"frontmatter": {
"outline": "deep"
},
"title": "工程化高频面试题",
"date": "1970-01-01 00:00:00",
"capture": "工程化高频面试题\nThis page demonstrates usage of some of the runtime APIs provided by VitePress.\nThe main `useData()` API can be used to access site, theme, and page data for the current page. It works in both `.md` and `.vue` files:\n```md\n```\n HTML\n CSS\n JS\nCheck out the documentation for the full list of "
},
{
"url": "/前端/框架篇/VUE/vue.html",
"relativePath": "/前端/框架篇/VUE/vue.html",
"frontmatter": {
"outline": "deep"
},
"title": "Vue",
"date": "1970-01-01 00:00:00",
"capture": "Vue\n 引入Vue\n```\n<script src=\"https://cdn.jsdelivr.net/npm/vue@2.7.16/dist/vue.js\"\n```\n 具体结构\n``` 页面结构\n<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n <meta charset=\"UTF-8\">\n <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\n <title>Document"
},
{
"url": "/前端/进阶篇/",
"relativePath": "/前端/进阶篇/",
"frontmatter": {
"outline": "deep"
},
"title": "工程化高频面试题",
"date": "1970-01-01 00:00:00",
"capture": "工程化高频面试题\nThis page demonstrates usage of some of the runtime APIs provided by VitePress.\nThe main `useData()` API can be used to access site, theme, and page data for the current page. It works in both `.md` and `.vue` files:\n```md\n```\n TS\n Webpack\n Vite\n Vue\n React\n Nodejs/Express/Fastify\n Nuxt.JS\n"
},
{
"url": "/后端/api-examples.html",
"relativePath": "/后端/api-examples.html",
"frontmatter": {
"outline": "deep"
},
"title": "Runtime API Examples",
"date": "1970-01-01 00:00:00",
"capture": "Runtime API Examples\nThis page demonstrates usage of some of the runtime APIs provided by VitePress.\nThe main `useData()` API can be used to access site, theme, and page data for the current page. It works in both `.md` and `.vue` files:\n```md\n<script setup\nimport { useData } from 'vitepress'\ncon"
},
{
"url": "/小说/三灾.html",
"relativePath": "/小说/三灾.html",
"frontmatter": {},
"title": "html",
"date": "1970-01-01 00:00:00",
"capture": ""
},
{
"url": "/小说/回魂.html",
"relativePath": "/小说/回魂.html",
"frontmatter": {},
"title": "html",
"date": "1970-01-01 00:00:00",
"capture": ""
},
{
"url": "/小说/度苦记.html",
"relativePath": "/小说/度苦记.html",
"frontmatter": {},
"title": "html",
"date": "1970-01-01 00:00:00",
"capture": ""
},
{
"url": "/小说/梦游记.html",
"relativePath": "/小说/梦游记.html",
"frontmatter": {
"outline": "deep"
},
"title": "Runtime API Examples",
"date": "1970-01-01 00:00:00",
"capture": "Runtime API Examples\nThis page demonstrates usage of some of the runtime APIs provided by VitePress.\nThe main `useData()` API can be used to access site, theme, and page data for the current page. It works in both `.md` and `.vue` files:\n```md\n<script setup\nimport { useData } from 'vitepress'\ncon"
},
{
"url": "/小说/死环.html",
"relativePath": "/小说/死环.html",
"frontmatter": {},
"title": "html",
"date": "1970-01-01 00:00:00",
"capture": ""
},
{
"url": "/小说/火种.html",
"relativePath": "/小说/火种.html",
"frontmatter": {},
"title": "html",
"date": "1970-01-01 00:00:00",
"capture": ""
},
{
"url": "/小说/盗亦有道.html",
"relativePath": "/小说/盗亦有道.html",
"frontmatter": {},
"title": "html",
"date": "1970-01-01 00:00:00",
"capture": ""
},
{
"url": "/小说/返生.html",
"relativePath": "/小说/返生.html",
"frontmatter": {},
"title": "html",
"date": "1970-01-01 00:00:00",
"capture": ""
},
{
"url": "/小说/长生贼.html",
"relativePath": "/小说/长生贼.html",
"frontmatter": {},
"title": "html",
"date": "1970-01-01 00:00:00",
"capture": ""
},
{
"url": "/算法/前端算法.html",
"relativePath": "/算法/前端算法.html",
"frontmatter": {
"outline": "deep"
},
"title": "链表",
"date": "1970-01-01 00:00:00",
"capture": "链表\n 反转链表\n<pre\n<pre>输入:head头节点</pre>\n<pre>输出:反转后新头节点</pre>\n 思路及代码\n<pre>思路:记录,反转\n给前任赋null,现任是头节点\n然后还有现任的时候,先把下任存好(const next = curr.next)\n让现任的next指针去找前任,即 curr.next = prev\n把前任换成现任, prev = curr\n把现任换成下一任, curr = next\n</pre>\n``` JS\nfunction reverseList(head){ //传入头"
},
{
"url": "/算法/动态规划.html",
"relativePath": "/算法/动态规划.html",
"frontmatter": {
"outline": "deep"
},
"title": "寻找第K大",
"date": "1970-01-01 00:00:00",
"capture": "寻找第K大\n思路: 分治思想,及快速选择算法或者使用小栈堆,即维护K个元素,堆顶为第K大\n```md\n<script setup\nimport { useData } from 'vitepress'\nconst { theme, page, frontmatter } = useData()\n</script>\n Results\n Theme Data\n<pre>{{ theme }}</pre>\n Page Data\n<pre>{{ page }}</pre>\n Page Frontmatter\n<pre>{{ "
},
{
"url": "/算法/基础.html",
"relativePath": "/算法/基础.html",
"frontmatter": {
"outline": "deep"
},
"title": "算法基础",
"date": "1970-01-01 00:00:00",
"capture": "算法基础 \n```md\n```\n 数据结构\n 栈、队列、链表\n 集合、字典\n 树、堆、图\n 链表\n 遍历链表、删除链表节点\n 树、图\n 深度/广度优先遍历\n 数组\n 冒泡/选择/插入/归并/快速排序、顺序/二分搜索\n 时间复杂度\n 空间复杂度\n 常见 O(1) O(logN) O(N) O(N²) \nCheck out the documentation for the full list of runtime APIs."
},
{
"url": "/算法/堆.html",
"relativePath": "/算法/堆.html",
"frontmatter": {
"outline": "deep"
},
"title": "寻找第K大",
"date": "1970-01-01 00:00:00",
"capture": "寻找第K大\n思路: 分治思想,及快速选择算法或者使用小栈堆,即维护K个元素,堆顶为第K大\n```md\n<script setup\nimport { useData } from 'vitepress'\nconst { theme, page, frontmatter } = useData()\n</script>\n Results\n Theme Data\n<pre>{{ theme }}</pre>\n Page Data\n<pre>{{ page }}</pre>\n Page Frontmatter\n<pre>{{ "
},
{
"url": "/算法/字典.html",
"relativePath": "/算法/字典.html",
"frontmatter": {
"outline": "deep"
},
"title": "字典",
"date": "1970-01-01 00:00:00",
"capture": "字典\n 字典特性\n<pre\n与集合类似,字典也是一种存储唯一值的数据结构,但是是以键值对的形式来存储\nES6中的字典叫做Map\n</pre>\n```md\nconst m = new Map()\n//增 m.set()\nm.set('a','aa');\n//删 m.delete()\nm.set('b','bb')\nm.delete('b')\n//清空所有\nm.clear()\n//改\nm.set('a','aaa') //直接覆盖就行\n//查 m.get() get拿到的值\n```\n 两个数组的交集 LC349\n<pre>\n给定两个数组,编写一个函数来求出他们的交"
},
{
"url": "/算法/排序.html",
"relativePath": "/算法/排序.html",
"frontmatter": {
"outline": "deep"
},
"title": "寻找第K大",
"date": "1970-01-01 00:00:00",
"capture": "寻找第K大\n<pre\n<pre>输入:数组及数字k</pre>\n<pre>输出:第k大的数</pre>\n<pre>思路:nums是一个数组,我们可以先找k对应数的索引,即排序过后数的对应索引\n随后,我们通过快速选择配合分区来进行筛选\n首先确定left和right,partition中进行判断,可以以right为基准\n然后让j等于左边界,开始循环,每次增加时判断与right的大小\n当j对应的值小于基准值,则让其放到左区中,逻辑是 [num[i++],num[j]] = [num[j],num[i]]\n第一轮实际上i=j,i++是控"
},
{
"url": "/算法/数组.html",
"relativePath": "/算法/数组.html",
"frontmatter": {
"outline": "deep"
},
"title": "寻找第K大",
"date": "1970-01-01 00:00:00",
"capture": "寻找第K大\n思路: 分治思想,及快速选择算法或者使用小栈堆,即维护K个元素,堆顶为第K大\n```md\n<script setup\nimport { useData } from 'vitepress'\nconst { theme, page, frontmatter } = useData()\n</script>\n Results\n Theme Data\n<pre>{{ theme }}</pre>\n Page Data\n<pre>{{ page }}</pre>\n Page Frontmatter\n<pre>{{ "
},
{
"url": "/算法/栈.html",
"relativePath": "/算法/栈.html",
"frontmatter": {
"outline": "deep"
},
"title": "栈",
"date": "1970-01-01 00:00:00",
"capture": "栈\n ·栈是一个后进先出的数据结构\n ·JS中没有栈,但可以用Array实现栈的所有功能\n ·栈常用操作:push/pop/stack[stack.length-1]\n```md\n```\n 有效的括号(纯栈)\n 对于没有闭合的左括号,越靠后的左括号,其对应右括号越靠前\n```md\nfunction isvaild (s){\n if(s.length % 2 === 1) return false\n const stack = []\n for(let i =0;i<s.length ;i++){\n const c = s[i]\n if(c ="
},
{
"url": "/算法/树.html",
"relativePath": "/算法/树.html",
"frontmatter": {
"outline": "deep"
},
"title": "树",
"date": "1970-01-01 00:00:00",
"capture": "树\n<pre\n树是一种分层数据的抽象模型\n</pre>\n<pre>\n前端中常见的树包括:\nDOM树/级联选择/树形控件 \n</pre>\n<pre>\nJS中没有树,但是可以用Object和Array构建树\n树的常用操作:\n深度/广度优先遍历\n前中后序遍历\n</pre>\n<pre></pre>\n```\n```\n 深度/广度优先遍历\n 深度优先遍历\n<pre>\n尽可能深的搜索树的分支\n</pre>\n<pre>\n算法口诀:\n访问根节点\n对根节点的children挨个进行深度优先"
},
{
"url": "/算法/链表.html",
"relativePath": "/算法/链表.html",
"frontmatter": {
"outline": "deep"
},
"title": "链表",
"date": "1970-01-01 00:00:00",
"capture": "链表\n 链表是多个元素组成的列表\n 元素存储不连续,用next指针连在一起\n 遍历链表\n``` md\n let p = a;\n while(p){\n console.log(p.val)\n p = p.next\n }\n```\n 插入\n``` md\nconst e = {val:'e'}\nc.next = e;\ne.next = d;\n```\n 删除\n```\nc.next = d\n```\n 删除链表中的节点LC237\n 要求:请编写函数,使其可以删除某个链表中给定的非末尾节点,将只被给定要求被删除的节点\n 现有链表 -- head = [4,5,1,9] \n```\nfunctio"
},
{
"url": "/算法/队列.html",
"relativePath": "/算法/队列.html",
"frontmatter": {
"outline": "deep"
},
"title": "栈",
"date": "1970-01-01 00:00:00",
"capture": "栈\n ·栈是一个先进先出的数据结构\n ·JS中没有队列,但可以用Array实现队列的所有功能\n ·栈常用操作:push/shift/queue[queue.length-1]\n 使用场景\n 食堂排队打饭\n JS异步中的任务队列\n 计算最近请求次数\n 计算最近请求次数(LC933)\n 输入: input = [[],[1],[100],[3001],[3002]]\n 输出: [null,1,2,3,3]\n 解题步骤:新请求入队,3000ms 前发出的请求出队,队列长度即最近请求次数\n```md\nvar RecentCounter = function(){\n this.q = []\n}\nR"
},
{
"url": "/算法/集合.html",
"relativePath": "/算法/集合.html",
"frontmatter": {
"outline": "deep"
},
"title": "集合",
"date": "1970-01-01 00:00:00",
"capture": "集合\n 集合特性\n<pre\n一种无序且唯一的数据结构\nES6中有集合,名为Set\n常规操作:\n去重\n判断某元素是否在集合中,求交集\n</pre>\n```md\n//去重\nconst arr = [1,1,2,2];\nconst arr2 = [...new Set(arr)];\n//判断元素是否在集合中\nconst set = new Set(arr)\nconst has = set.has(1) //结果是boolean\n//求交集\nconst set2 = new Set([2,3]);\nconst set3 = new Set([...set].filter(ite"
},
{
"url": "/语音/api-examples.html",
"relativePath": "/语音/api-examples.html",
"frontmatter": {
"outline": "deep"
},
"title": "Runtime API Examples",
"date": "1970-01-01 00:00:00",
"capture": "Runtime API Examples\nThis page demonstrates usage of some of the runtime APIs provided by VitePress.\nThe main `useData()` API can be used to access site, theme, and page data for the current page. It works in both `.md` and `.vue` files:\n```md\n<script setup\nimport { useData } from 'vitepress'\ncon"
},
{
"url": "/面试/CSS/",
"relativePath": "/面试/CSS/",
"frontmatter": {
"outline": "deep"
},
"title": "CSS高频面试题",
"date": "1970-01-01 00:00:00",
"capture": "CSS高频面试题\nThis page demonstrates usage of some of the runtime APIs provided by VitePress.\nThe main `useData()` API can be used to access site, theme, and page data for the current page. It works in both `.md` and `.vue` files:\n```md\n```\n BFC的意义与用法\n Theme Data\n Page Data\n Page Frontmatter\n 常见布局方案及定位方式"
},
{
"url": "/面试/HTML/",
"relativePath": "/面试/HTML/",
"frontmatter": {
"outline": "deep"
},
"title": "HTML高频面试题",
"date": "1970-01-01 00:00:00",
"capture": "HTML高频面试题\nThis page demonstrates usage of some of the runtime APIs provided by VitePress.\nThe main `useData()` API can be used to access site, theme, and page data for the current page. It works in both `.md` and `.vue` files:\n```md\n```\n HTML语义化标签\n Theme Data\n Page Data\n Page Frontmatter\n HTML结构\n HT"
},
{
"url": "/面试/JavaScript/",
"relativePath": "/面试/JavaScript/",
"frontmatter": {
"outline": "deep"
},
"title": "JavaScript高频面试题",
"date": "1970-01-01 00:00:00",
"capture": "JavaScript高频面试题\nThis page demonstrates usage of some of the runtime APIs provided by VitePress.\nThe main `useData()` API can be used to access site, theme, and page data for the current page. It works in both `.md` and `.vue` files:\n```md\n```\n ES6+新特性\n Theme Data\n Page Data\n Page Frontmatter\n 闭包\n JS"
},
{
"url": "/面试/Nest/",
"relativePath": "/面试/Nest/",
"frontmatter": {
"outline": "deep"
},
"title": "工程化高频面试题",
"date": "1970-01-01 00:00:00",
"capture": "工程化高频面试题\nThis page demonstrates usage of some of the runtime APIs provided by VitePress.\nThe main `useData()` API can be used to access site, theme, and page data for the current page. It works in both `.md` and `.vue` files:\n```md\n```\n NestJS的底层原理\n IOC\n 依赖注入\n NestJS Module\n NestJS Controller\n NestJ"
},
{
"url": "/面试/Next/",
"relativePath": "/面试/Next/",
"frontmatter": {
"outline": "deep"
},
"title": "Nextjs 面试题",
"date": "1970-01-01 00:00:00",
"capture": "```md\n```\n Nextjs的优点\n Nextjs路由\n 文件夹路由\n 嵌套路由\n Nextjs优化\n 路由懒加载\n 图片懒加载\n 组件懒加载\n Nextjs 水合\n Nextjs 渲染\n SSR的实现\n SSG的实现\n CSR的实现\nCheck out the documentation for the full list of runtime APIs."
},
{
"url": "/面试/React/",
"relativePath": "/面试/React/",
"frontmatter": {
"outline": "deep"
},
"title": "React高频面试题",
"date": "1970-01-01 00:00:00",
"capture": "React高频面试题\nThis page demonstrates usage of some of the runtime APIs provided by VitePress.\nThe main `useData()` API can be used to access site, theme, and page data for the current page. It works in both `.md` and `.vue` files:\n```md\n```\n 虚拟DOM与Diff算法\n Diff算法的优化策略\n Theme Data\n<pre\n Page Data\n<"
},
{
"url": "/面试/SSE/",
"relativePath": "/面试/SSE/",
"frontmatter": {
"outline": "deep"
},
"title": "SSE流式输出",
"date": "1970-01-01 00:00:00",
"capture": "SSE流式输出\nThis page demonstrates usage of some of the runtime APIs provided by VitePress.\nThe main `useData()` API can be used to access site, theme, and page data for the current page. It works in both `.md` and `.vue` files:\n```md\n```\n SSE流式输出的概念\n SSE流式输出的原理\n SSE流式输出的实现\nCheck out the documentation f"
},
{
"url": "/面试/TypeScript/",
"relativePath": "/面试/TypeScript/",
"frontmatter": {
"outline": "deep"
},
"title": "TS面试题",
"date": "1970-01-01 00:00:00",
"capture": "TS面试题\nThis page demonstrates usage of some of the runtime APIs provided by VitePress.\nThe main `useData()` API can be used to access site, theme, and page data for the current page. It works in both `.md` and `.vue` files:\n```md\n```\n TS在项目中的使用\n Theme Data\n Page Data\n Page Frontmatter\n Interface和type"
},
{
"url": "/面试/前沿技术/",
"relativePath": "/面试/前沿技术/",
"frontmatter": {
"outline": "deep"
},
"title": "前沿技术面试题",
"date": "1970-01-01 00:00:00",
"capture": "前沿技术面试题\nThis page demonstrates usage of some of the runtime APIs provided by VitePress.\nThe main `useData()` API can be used to access site, theme, and page data for the current page. It works in both `.md` and `.vue` files:\n```md\n```\n WebAssembly\n 微前端\n 常用的微前端框架\n React Native /小程序开发\n AI大模型在前端的应用场景\nC"
},
{
"url": "/面试/工程化/",
"relativePath": "/面试/工程化/",
"frontmatter": {
"outline": "deep"
},
"title": "工程化高频面试题",
"date": "1970-01-01 00:00:00",
"capture": "工程化高频面试题\nThis page demonstrates usage of some of the runtime APIs provided by VitePress.\nThe main `useData()` API can be used to access site, theme, and page data for the current page. It works in both `.md` and `.vue` files:\n```md\n```\n Webpack\n loader和plugin的区别\n 自定义loader/plugin\n Vite\n Vite的热更新原理\n "
},
{
"url": "/面试/性能优化/",
"relativePath": "/面试/性能优化/",
"frontmatter": {
"outline": "deep"
},
"title": "性能优化面试题",
"date": "1970-01-01 00:00:00",
"capture": "性能优化面试题\nThis page demonstrates usage of some of the runtime APIs provided by VitePress.\nThe main `useData()` API can be used to access site, theme, and page data for the current page. It works in both `.md` and `.vue` files:\n```md\n```\n 代码优化\n 静态资源优化\n 组件优化\n 缓存优化\nCheck out the documentation for the"
},
{
"url": "/面试/浏览器/",
"relativePath": "/面试/浏览器/",
"frontmatter": {
"outline": "deep"
},
"title": "浏览器高频面试题",
"date": "1970-01-01 00:00:00",
"capture": "浏览器高频面试题\nThis page demonstrates usage of some of the runtime APIs provided by VitePress.\nThe main `useData()` API can be used to access site, theme, and page data for the current page. It works in both `.md` and `.vue` files:\n```md\n```\n 浏览器的垃圾回收机制\n 浏览器渲染流程\n 浏览器同源策略\n 浏览器性能指标\n Service Worker\n 如何实现 PWA"
},
{
"url": "/面试/计网/",
"relativePath": "/面试/计网/",
"frontmatter": {
"outline": "deep"
},
"title": "计网高频面试题",
"date": "1970-01-01 00:00:00",
"capture": "计网高频面试题\nThis page demonstrates usage of some of the runtime APIs provided by VitePress.\nThe main `useData()` API can be used to access site, theme, and page data for the current page. It works in both `.md` and `.vue` files:\n```md\n```\n 常见的网络攻击\n XSS\n CRSF\n Theme Data\n<pre\n Page Data\n<pre>{{ "
}
],
"sortPostsByDateAndSticky": [
{
"url": "/markdown-examples.html",
"relativePath": "/markdown-examples.html",
"frontmatter": {},
"title": "Markdown Extension Examples",
"date": "1970-01-01 00:00:00",
"capture": "This page demonstrates some of the built-in markdown extensions provided by VitePress.\n Syntax Highlighting\nVitePress provides Syntax Highlighting powered by Shiki, with additional features like line-highlighting:\nInput\n````md\n```js{4}\nexport default {\n data () {\n return {\n msg: 'Highlighte"
},
{
"url": "/前端/",
"relativePath": "/前端/",
"frontmatter": {
"outline": "deep"
},
"title": "Runtime API Examples",
"date": "1970-01-01 00:00:00",
"capture": "Runtime API Examples\nThis page demonstrates usage of some of the runtime APIs provided by VitePress.\nThe main `useData()` API can be used to access site, theme, and page data for the current page. It works in both `.md` and `.vue` files:\n```md\n<script setup\nimport { useData } from 'vitepress'\ncon"
},
{
"url": "/前端/基础篇/",
"relativePath": "/前端/基础篇/",
"frontmatter": {
"outline": "deep"
},
"title": "工程化高频面试题",
"date": "1970-01-01 00:00:00",
"capture": "工程化高频面试题\nThis page demonstrates usage of some of the runtime APIs provided by VitePress.\nThe main `useData()` API can be used to access site, theme, and page data for the current page. It works in both `.md` and `.vue` files:\n```md\n```\n HTML\n CSS\n JS\nCheck out the documentation for the full list of "
},
{
"url": "/前端/框架篇/VUE/vue.html",
"relativePath": "/前端/框架篇/VUE/vue.html",
"frontmatter": {
"outline": "deep"
},
"title": "Vue",
"date": "1970-01-01 00:00:00",
"capture": "Vue\n 引入Vue\n```\n<script src=\"https://cdn.jsdelivr.net/npm/vue@2.7.16/dist/vue.js\"\n```\n 具体结构\n``` 页面结构\n<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n <meta charset=\"UTF-8\">\n <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\n <title>Document"
},
{
"url": "/前端/进阶篇/",
"relativePath": "/前端/进阶篇/",
"frontmatter": {
"outline": "deep"
},
"title": "工程化高频面试题",
"date": "1970-01-01 00:00:00",
"capture": "工程化高频面试题\nThis page demonstrates usage of some of the runtime APIs provided by VitePress.\nThe main `useData()` API can be used to access site, theme, and page data for the current page. It works in both `.md` and `.vue` files:\n```md\n```\n TS\n Webpack\n Vite\n Vue\n React\n Nodejs/Express/Fastify\n Nuxt.JS\n"
},
{
"url": "/后端/api-examples.html",
"relativePath": "/后端/api-examples.html",
"frontmatter": {
"outline": "deep"
},
"title": "Runtime API Examples",
"date": "1970-01-01 00:00:00",
"capture": "Runtime API Examples\nThis page demonstrates usage of some of the runtime APIs provided by VitePress.\nThe main `useData()` API can be used to access site, theme, and page data for the current page. It works in both `.md` and `.vue` files:\n```md\n<script setup\nimport { useData } from 'vitepress'\ncon"
},
{
"url": "/小说/三灾.html",
"relativePath": "/小说/三灾.html",
"frontmatter": {},
"title": "html",
"date": "1970-01-01 00:00:00",
"capture": ""
},
{
"url": "/小说/回魂.html",
"relativePath": "/小说/回魂.html",
"frontmatter": {},
"title": "html",
"date": "1970-01-01 00:00:00",
"capture": ""
},
{
"url": "/小说/度苦记.html",
"relativePath": "/小说/度苦记.html",
"frontmatter": {},
"title": "html",
"date": "1970-01-01 00:00:00",
"capture": ""
},
{
"url": "/小说/梦游记.html",
"relativePath": "/小说/梦游记.html",
"frontmatter": {
"outline": "deep"
},
"title": "Runtime API Examples",
"date": "1970-01-01 00:00:00",
"capture": "Runtime API Examples\nThis page demonstrates usage of some of the runtime APIs provided by VitePress.\nThe main `useData()` API can be used to access site, theme, and page data for the current page. It works in both `.md` and `.vue` files:\n```md\n<script setup\nimport { useData } from 'vitepress'\ncon"
},
{
"url": "/小说/死环.html",
"relativePath": "/小说/死环.html",
"frontmatter": {},
"title": "html",
"date": "1970-01-01 00:00:00",
"capture": ""
},
{
"url": "/小说/火种.html",
"relativePath": "/小说/火种.html",
"frontmatter": {},
"title": "html",
"date": "1970-01-01 00:00:00",
"capture": ""
},
{
"url": "/小说/盗亦有道.html",
"relativePath": "/小说/盗亦有道.html",
"frontmatter": {},
"title": "html",
"date": "1970-01-01 00:00:00",
"capture": ""
},
{
"url": "/小说/返生.html",
"relativePath": "/小说/返生.html",
"frontmatter": {},
"title": "html",
"date": "1970-01-01 00:00:00",
"capture": ""
},
{
"url": "/小说/长生贼.html",
"relativePath": "/小说/长生贼.html",
"frontmatter": {},
"title": "html",
"date": "1970-01-01 00:00:00",
"capture": ""
},
{
"url": "/算法/前端算法.html",
"relativePath": "/算法/前端算法.html",
"frontmatter": {
"outline": "deep"
},
"title": "链表",
"date": "1970-01-01 00:00:00",
"capture": "链表\n 反转链表\n<pre\n<pre>输入:head头节点</pre>\n<pre>输出:反转后新头节点</pre>\n 思路及代码\n<pre>思路:记录,反转\n给前任赋null,现任是头节点\n然后还有现任的时候,先把下任存好(const next = curr.next)\n让现任的next指针去找前任,即 curr.next = prev\n把前任换成现任, prev = curr\n把现任换成下一任, curr = next\n</pre>\n``` JS\nfunction reverseList(head){ //传入头"
},
{
"url": "/算法/动态规划.html",
"relativePath": "/算法/动态规划.html",
"frontmatter": {
"outline": "deep"
},
"title": "寻找第K大",
"date": "1970-01-01 00:00:00",
"capture": "寻找第K大\n思路: 分治思想,及快速选择算法或者使用小栈堆,即维护K个元素,堆顶为第K大\n```md\n<script setup\nimport { useData } from 'vitepress'\nconst { theme, page, frontmatter } = useData()\n</script>\n Results\n Theme Data\n<pre>{{ theme }}</pre>\n Page Data\n<pre>{{ page }}</pre>\n Page Frontmatter\n<pre>{{ "
},
{
"url": "/算法/基础.html",
"relativePath": "/算法/基础.html",
"frontmatter": {
"outline": "deep"
},
"title": "算法基础",
"date": "1970-01-01 00:00:00",
"capture": "算法基础 \n```md\n```\n 数据结构\n 栈、队列、链表\n 集合、字典\n 树、堆、图\n 链表\n 遍历链表、删除链表节点\n 树、图\n 深度/广度优先遍历\n 数组\n 冒泡/选择/插入/归并/快速排序、顺序/二分搜索\n 时间复杂度\n 空间复杂度\n 常见 O(1) O(logN) O(N) O(N²) \nCheck out the documentation for the full list of runtime APIs."
},
{
"url": "/算法/堆.html",
"relativePath": "/算法/堆.html",
"frontmatter": {
"outline": "deep"
},
"title": "寻找第K大",
"date": "1970-01-01 00:00:00",
"capture": "寻找第K大\n思路: 分治思想,及快速选择算法或者使用小栈堆,即维护K个元素,堆顶为第K大\n```md\n<script setup\nimport { useData } from 'vitepress'\nconst { theme, page, frontmatter } = useData()\n</script>\n Results\n Theme Data\n<pre>{{ theme }}</pre>\n Page Data\n<pre>{{ page }}</pre>\n Page Frontmatter\n<pre>{{ "
},
{
"url": "/算法/字典.html",
"relativePath": "/算法/字典.html",
"frontmatter": {
"outline": "deep"
},
"title": "字典",
"date": "1970-01-01 00:00:00",
"capture": "字典\n 字典特性\n<pre\n与集合类似,字典也是一种存储唯一值的数据结构,但是是以键值对的形式来存储\nES6中的字典叫做Map\n</pre>\n```md\nconst m = new Map()\n//增 m.set()\nm.set('a','aa');\n//删 m.delete()\nm.set('b','bb')\nm.delete('b')\n//清空所有\nm.clear()\n//改\nm.set('a','aaa') //直接覆盖就行\n//查 m.get() get拿到的值\n```\n 两个数组的交集 LC349\n<pre>\n给定两个数组,编写一个函数来求出他们的交"
},
{
"url": "/算法/排序.html",
"relativePath": "/算法/排序.html",
"frontmatter": {
"outline": "deep"
},
"title": "寻找第K大",
"date": "1970-01-01 00:00:00",
"capture": "寻找第K大\n<pre\n<pre>输入:数组及数字k</pre>\n<pre>输出:第k大的数</pre>\n<pre>思路:nums是一个数组,我们可以先找k对应数的索引,即排序过后数的对应索引\n随后,我们通过快速选择配合分区来进行筛选\n首先确定left和right,partition中进行判断,可以以right为基准\n然后让j等于左边界,开始循环,每次增加时判断与right的大小\n当j对应的值小于基准值,则让其放到左区中,逻辑是 [num[i++],num[j]] = [num[j],num[i]]\n第一轮实际上i=j,i++是控"
},
{
"url": "/算法/数组.html",
"relativePath": "/算法/数组.html",
"frontmatter": {
"outline": "deep"
},
"title": "寻找第K大",
"date": "1970-01-01 00:00:00",
"capture": "寻找第K大\n思路: 分治思想,及快速选择算法或者使用小栈堆,即维护K个元素,堆顶为第K大\n```md\n<script setup\nimport { useData } from 'vitepress'\nconst { theme, page, frontmatter } = useData()\n</script>\n Results\n Theme Data\n<pre>{{ theme }}</pre>\n Page Data\n<pre>{{ page }}</pre>\n Page Frontmatter\n<pre>{{ "
},
{
"url": "/算法/栈.html",
"relativePath": "/算法/栈.html",
"frontmatter": {
"outline": "deep"
},
"title": "栈",
"date": "1970-01-01 00:00:00",
"capture": "栈\n ·栈是一个后进先出的数据结构\n ·JS中没有栈,但可以用Array实现栈的所有功能\n ·栈常用操作:push/pop/stack[stack.length-1]\n```md\n```\n 有效的括号(纯栈)\n 对于没有闭合的左括号,越靠后的左括号,其对应右括号越靠前\n```md\nfunction isvaild (s){\n if(s.length % 2 === 1) return false\n const stack = []\n for(let i =0;i<s.length ;i++){\n const c = s[i]\n if(c ="
},
{
"url": "/算法/树.html",
"relativePath": "/算法/树.html",
"frontmatter": {
"outline": "deep"
},
"title": "树",
"date": "1970-01-01 00:00:00",
"capture": "树\n<pre\n树是一种分层数据的抽象模型\n</pre>\n<pre>\n前端中常见的树包括:\nDOM树/级联选择/树形控件 \n</pre>\n<pre>\nJS中没有树,但是可以用Object和Array构建树\n树的常用操作:\n深度/广度优先遍历\n前中后序遍历\n</pre>\n<pre></pre>\n```\n```\n 深度/广度优先遍历\n 深度优先遍历\n<pre>\n尽可能深的搜索树的分支\n</pre>\n<pre>\n算法口诀:\n访问根节点\n对根节点的children挨个进行深度优先"
},
{
"url": "/算法/链表.html",
"relativePath": "/算法/链表.html",
"frontmatter": {
"outline": "deep"
},
"title": "链表",
"date": "1970-01-01 00:00:00",
"capture": "链表\n 链表是多个元素组成的列表\n 元素存储不连续,用next指针连在一起\n 遍历链表\n``` md\n let p = a;\n while(p){\n console.log(p.val)\n p = p.next\n }\n```\n 插入\n``` md\nconst e = {val:'e'}\nc.next = e;\ne.next = d;\n```\n 删除\n```\nc.next = d\n```\n 删除链表中的节点LC237\n 要求:请编写函数,使其可以删除某个链表中给定的非末尾节点,将只被给定要求被删除的节点\n 现有链表 -- head = [4,5,1,9] \n```\nfunctio"
},
{
"url": "/算法/队列.html",
"relativePath": "/算法/队列.html",
"frontmatter": {
"outline": "deep"
},
"title": "栈",
"date": "1970-01-01 00:00:00",
"capture": "栈\n ·栈是一个先进先出的数据结构\n ·JS中没有队列,但可以用Array实现队列的所有功能\n ·栈常用操作:push/shift/queue[queue.length-1]\n 使用场景\n 食堂排队打饭\n JS异步中的任务队列\n 计算最近请求次数\n 计算最近请求次数(LC933)\n 输入: input = [[],[1],[100],[3001],[3002]]\n 输出: [null,1,2,3,3]\n 解题步骤:新请求入队,3000ms 前发出的请求出队,队列长度即最近请求次数\n```md\nvar RecentCounter = function(){\n this.q = []\n}\nR"
},
{
"url": "/算法/集合.html",
"relativePath": "/算法/集合.html",
"frontmatter": {
"outline": "deep"
},
"title": "集合",
"date": "1970-01-01 00:00:00",
"capture": "集合\n 集合特性\n<pre\n一种无序且唯一的数据结构\nES6中有集合,名为Set\n常规操作:\n去重\n判断某元素是否在集合中,求交集\n</pre>\n```md\n//去重\nconst arr = [1,1,2,2];\nconst arr2 = [...new Set(arr)];\n//判断元素是否在集合中\nconst set = new Set(arr)\nconst has = set.has(1) //结果是boolean\n//求交集\nconst set2 = new Set([2,3]);\nconst set3 = new Set([...set].filter(ite"
},
{
"url": "/语音/api-examples.html",
"relativePath": "/语音/api-examples.html",
"frontmatter": {
"outline": "deep"
},
"title": "Runtime API Examples",
"date": "1970-01-01 00:00:00",
"capture": "Runtime API Examples\nThis page demonstrates usage of some of the runtime APIs provided by VitePress.\nThe main `useData()` API can be used to access site, theme, and page data for the current page. It works in both `.md` and `.vue` files:\n```md\n<script setup\nimport { useData } from 'vitepress'\ncon"
},
{
"url": "/面试/CSS/",
"relativePath": "/面试/CSS/",
"frontmatter": {
"outline": "deep"
},
"title": "CSS高频面试题",
"date": "1970-01-01 00:00:00",
"capture": "CSS高频面试题\nThis page demonstrates usage of some of the runtime APIs provided by VitePress.\nThe main `useData()` API can be used to access site, theme, and page data for the current page. It works in both `.md` and `.vue` files:\n```md\n```\n BFC的意义与用法\n Theme Data\n Page Data\n Page Frontmatter\n 常见布局方案及定位方式"
},
{
"url": "/面试/HTML/",
"relativePath": "/面试/HTML/",
"frontmatter": {
"outline": "deep"
},
"title": "HTML高频面试题",
"date": "1970-01-01 00:00:00",
"capture": "HTML高频面试题\nThis page demonstrates usage of some of the runtime APIs provided by VitePress.\nThe main `useData()` API can be used to access site, theme, and page data for the current page. It works in both `.md` and `.vue` files:\n```md\n```\n HTML语义化标签\n Theme Data\n Page Data\n Page Frontmatter\n HTML结构\n HT"
},
{
"url": "/面试/JavaScript/",
"relativePath": "/面试/JavaScript/",
"frontmatter": {
"outline": "deep"
},
"title": "JavaScript高频面试题",
"date": "1970-01-01 00:00:00",
"capture": "JavaScript高频面试题\nThis page demonstrates usage of some of the runtime APIs provided by VitePress.\nThe main `useData()` API can be used to access site, theme, and page data for the current page. It works in both `.md` and `.vue` files:\n```md\n```\n ES6+新特性\n Theme Data\n Page Data\n Page Frontmatter\n 闭包\n JS"
},
{
"url": "/面试/Nest/",
"relativePath": "/面试/Nest/",
"frontmatter": {
"outline": "deep"
},
"title": "工程化高频面试题",
"date": "1970-01-01 00:00:00",
"capture": "工程化高频面试题\nThis page demonstrates usage of some of the runtime APIs provided by VitePress.\nThe main `useData()` API can be used to access site, theme, and page data for the current page. It works in both `.md` and `.vue` files:\n```md\n```\n NestJS的底层原理\n IOC\n 依赖注入\n NestJS Module\n NestJS Controller\n NestJ"
},
{
"url": "/面试/Next/",
"relativePath": "/面试/Next/",
"frontmatter": {
"outline": "deep"
},
"title": "Nextjs 面试题",
"date": "1970-01-01 00:00:00",
"capture": "```md\n```\n Nextjs的优点\n Nextjs路由\n 文件夹路由\n 嵌套路由\n Nextjs优化\n 路由懒加载\n 图片懒加载\n 组件懒加载\n Nextjs 水合\n Nextjs 渲染\n SSR的实现\n SSG的实现\n CSR的实现\nCheck out the documentation for the full list of runtime APIs."
},
{
"url": "/面试/React/",
"relativePath": "/面试/React/",
"frontmatter": {
"outline": "deep"
},
"title": "React高频面试题",
"date": "1970-01-01 00:00:00",
"capture": "React高频面试题\nThis page demonstrates usage of some of the runtime APIs provided by VitePress.\nThe main `useData()` API can be used to access site, theme, and page data for the current page. It works in both `.md` and `.vue` files:\n```md\n```\n 虚拟DOM与Diff算法\n Diff算法的优化策略\n Theme Data\n<pre\n Page Data\n<"
},
{
"url": "/面试/SSE/",
"relativePath": "/面试/SSE/",
"frontmatter": {
"outline": "deep"
},
"title": "SSE流式输出",
"date": "1970-01-01 00:00:00",
"capture": "SSE流式输出\nThis page demonstrates usage of some of the runtime APIs provided by VitePress.\nThe main `useData()` API can be used to access site, theme, and page data for the current page. It works in both `.md` and `.vue` files:\n```md\n```\n SSE流式输出的概念\n SSE流式输出的原理\n SSE流式输出的实现\nCheck out the documentation f"
},
{
"url": "/面试/TypeScript/",
"relativePath": "/面试/TypeScript/",
"frontmatter": {
"outline": "deep"
},
"title": "TS面试题",
"date": "1970-01-01 00:00:00",
"capture": "TS面试题\nThis page demonstrates usage of some of the runtime APIs provided by VitePress.\nThe main `useData()` API can be used to access site, theme, and page data for the current page. It works in both `.md` and `.vue` files:\n```md\n```\n TS在项目中的使用\n Theme Data\n Page Data\n Page Frontmatter\n Interface和type"
},
{
"url": "/面试/前沿技术/",
"relativePath": "/面试/前沿技术/",
"frontmatter": {
"outline": "deep"
},
"title": "前沿技术面试题",
"date": "1970-01-01 00:00:00",
"capture": "前沿技术面试题\nThis page demonstrates usage of some of the runtime APIs provided by VitePress.\nThe main `useData()` API can be used to access site, theme, and page data for the current page. It works in both `.md` and `.vue` files:\n```md\n```\n WebAssembly\n 微前端\n 常用的微前端框架\n React Native /小程序开发\n AI大模型在前端的应用场景\nC"
},
{
"url": "/面试/工程化/",
"relativePath": "/面试/工程化/",
"frontmatter": {
"outline": "deep"
},
"title": "工程化高频面试题",
"date": "1970-01-01 00:00:00",
"capture": "工程化高频面试题\nThis page demonstrates usage of some of the runtime APIs provided by VitePress.\nThe main `useData()` API can be used to access site, theme, and page data for the current page. It works in both `.md` and `.vue` files:\n```md\n```\n Webpack\n loader和plugin的区别\n 自定义loader/plugin\n Vite\n Vite的热更新原理\n "
},
{
"url": "/面试/性能优化/",
"relativePath": "/面试/性能优化/",
"frontmatter": {
"outline": "deep"
},
"title": "性能优化面试题",
"date": "1970-01-01 00:00:00",
"capture": "性能优化面试题\nThis page demonstrates usage of some of the runtime APIs provided by VitePress.\nThe main `useData()` API can be used to access site, theme, and page data for the current page. It works in both `.md` and `.vue` files:\n```md\n```\n 代码优化\n 静态资源优化\n 组件优化\n 缓存优化\nCheck out the documentation for the"
},
{
"url": "/面试/浏览器/",
"relativePath": "/面试/浏览器/",
"frontmatter": {
"outline": "deep"
},
"title": "浏览器高频面试题",
"date": "1970-01-01 00:00:00",
"capture": "浏览器高频面试题\nThis page demonstrates usage of some of the runtime APIs provided by VitePress.\nThe main `useData()` API can be used to access site, theme, and page data for the current page. It works in both `.md` and `.vue` files:\n```md\n```\n 浏览器的垃圾回收机制\n 浏览器渲染流程\n 浏览器同源策略\n 浏览器性能指标\n Service Worker\n 如何实现 PWA"
},
{
"url": "/面试/计网/",
"relativePath": "/面试/计网/",
"frontmatter": {
"outline": "deep"
},
"title": "计网高频面试题",
"date": "1970-01-01 00:00:00",
"capture": "计网高频面试题\nThis page demonstrates usage of some of the runtime APIs provided by VitePress.\nThe main `useData()` API can be used to access site, theme, and page data for the current page. It works in both `.md` and `.vue` files:\n```md\n```\n 常见的网络攻击\n XSS\n CRSF\n Theme Data\n<pre\n Page Data\n<pre>{{ "
}
],
"sortPostsByDate": [
{
"url": "/markdown-examples.html",
"relativePath": "/markdown-examples.html",
"frontmatter": {},
"title": "Markdown Extension Examples",
"date": "1970-01-01 00:00:00",
"capture": "This page demonstrates some of the built-in markdown extensions provided by VitePress.\n Syntax Highlighting\nVitePress provides Syntax Highlighting powered by Shiki, with additional features like line-highlighting:\nInput\n````md\n```js{4}\nexport default {\n data () {\n return {\n msg: 'Highlighte"
},
{
"url": "/前端/",
"relativePath": "/前端/",
"frontmatter": {
"outline": "deep"
},
"title": "Runtime API Examples",
"date": "1970-01-01 00:00:00",
"capture": "Runtime API Examples\nThis page demonstrates usage of some of the runtime APIs provided by VitePress.\nThe main `useData()` API can be used to access site, theme, and page data for the current page. It works in both `.md` and `.vue` files:\n```md\n<script setup\nimport { useData } from 'vitepress'\ncon"
},
{
"url": "/前端/基础篇/",
"relativePath": "/前端/基础篇/",
"frontmatter": {
"outline": "deep"
},
"title": "工程化高频面试题",
"date": "1970-01-01 00:00:00",
"capture": "工程化高频面试题\nThis page demonstrates usage of some of the runtime APIs provided by VitePress.\nThe main `useData()` API can be used to access site, theme, and page data for the current page. It works in both `.md` and `.vue` files:\n```md\n```\n HTML\n CSS\n JS\nCheck out the documentation for the full list of "
},
{
"url": "/前端/框架篇/VUE/vue.html",
"relativePath": "/前端/框架篇/VUE/vue.html",
"frontmatter": {
"outline": "deep"
},
"title": "Vue",
"date": "1970-01-01 00:00:00",
"capture": "Vue\n 引入Vue\n```\n<script src=\"https://cdn.jsdelivr.net/npm/vue@2.7.16/dist/vue.js\"\n```\n 具体结构\n``` 页面结构\n<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n <meta charset=\"UTF-8\">\n <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\n <title>Document"
},
{
"url": "/前端/进阶篇/",
"relativePath": "/前端/进阶篇/",
"frontmatter": {
"outline": "deep"
},
"title": "工程化高频面试题",
"date": "1970-01-01 00:00:00",
"capture": "工程化高频面试题\nThis page demonstrates usage of some of the runtime APIs provided by VitePress.\nThe main `useData()` API can be used to access site, theme, and page data for the current page. It works in both `.md` and `.vue` files:\n```md\n```\n TS\n Webpack\n Vite\n Vue\n React\n Nodejs/Express/Fastify\n Nuxt.JS\n"
},
{
"url": "/后端/api-examples.html",
"relativePath": "/后端/api-examples.html",
"frontmatter": {
"outline": "deep"
},
"title": "Runtime API Examples",
"date": "1970-01-01 00:00:00",
"capture": "Runtime API Examples\nThis page demonstrates usage of some of the runtime APIs provided by VitePress.\nThe main `useData()` API can be used to access site, theme, and page data for the current page. It works in both `.md` and `.vue` files:\n```md\n<script setup\nimport { useData } from 'vitepress'\ncon"
},
{
"url": "/小说/三灾.html",
"relativePath": "/小说/三灾.html",
"frontmatter": {},
"title": "html",
"date": "1970-01-01 00:00:00",
"capture": ""
},
{
"url": "/小说/回魂.html",
"relativePath": "/小说/回魂.html",
"frontmatter": {},
"title": "html",
"date": "1970-01-01 00:00:00",
"capture": ""
},
{
"url": "/小说/度苦记.html",
"relativePath": "/小说/度苦记.html",
"frontmatter": {},
"title": "html",
"date": "1970-01-01 00:00:00",
"capture": ""
},
{
"url": "/小说/梦游记.html",
"relativePath": "/小说/梦游记.html",
"frontmatter": {
"outline": "deep"
},
"title": "Runtime API Examples",
"date": "1970-01-01 00:00:00",
"capture": "Runtime API Examples\nThis page demonstrates usage of some of the runtime APIs provided by VitePress.\nThe main `useData()` API can be used to access site, theme, and page data for the current page. It works in both `.md` and `.vue` files:\n```md\n<script setup\nimport { useData } from 'vitepress'\ncon"
},
{
"url": "/小说/死环.html",
"relativePath": "/小说/死环.html",
"frontmatter": {},
"title": "html",
"date": "1970-01-01 00:00:00",
"capture": ""
},
{
"url": "/小说/火种.html",
"relativePath": "/小说/火种.html",
"frontmatter": {},
"title": "html",
"date": "1970-01-01 00:00:00",
"capture": ""
},
{
"url": "/小说/盗亦有道.html",
"relativePath": "/小说/盗亦有道.html",
"frontmatter": {},
"title": "html",
"date": "1970-01-01 00:00:00",
"capture": ""
},
{
"url": "/小说/返生.html",
"relativePath": "/小说/返生.html",
"frontmatter": {},
"title": "html",
"date": "1970-01-01 00:00:00",
"capture": ""
},
{
"url": "/小说/长生贼.html",
"relativePath": "/小说/长生贼.html",
"frontmatter": {},
"title": "html",
"date": "1970-01-01 00:00:00",
"capture": ""
},
{
"url": "/算法/前端算法.html",
"relativePath": "/算法/前端算法.html",
"frontmatter": {
"outline": "deep"
},
"title": "链表",
"date": "1970-01-01 00:00:00",
"capture": "链表\n 反转链表\n<pre\n<pre>输入:head头节点</pre>\n<pre>输出:反转后新头节点</pre>\n 思路及代码\n<pre>思路:记录,反转\n给前任赋null,现任是头节点\n然后还有现任的时候,先把下任存好(const next = curr.next)\n让现任的next指针去找前任,即 curr.next = prev\n把前任换成现任, prev = curr\n把现任换成下一任, curr = next\n</pre>\n``` JS\nfunction reverseList(head){ //传入头"
},
{
"url": "/算法/动态规划.html",
"relativePath": "/算法/动态规划.html",
"frontmatter": {
"outline": "deep"
},
"title": "寻找第K大",
"date": "1970-01-01 00:00:00",
"capture": "寻找第K大\n思路: 分治思想,及快速选择算法或者使用小栈堆,即维护K个元素,堆顶为第K大\n```md\n<script setup\nimport { useData } from 'vitepress'\nconst { theme, page, frontmatter } = useData()\n</script>\n Results\n Theme Data\n<pre>{{ theme }}</pre>\n Page Data\n<pre>{{ page }}</pre>\n Page Frontmatter\n<pre>{{ "
},
{
"url": "/算法/基础.html",
"relativePath": "/算法/基础.html",
"frontmatter": {
"outline": "deep"
},
"title": "算法基础",
"date": "1970-01-01 00:00:00",
"capture": "算法基础 \n```md\n```\n 数据结构\n 栈、队列、链表\n 集合、字典\n 树、堆、图\n 链表\n 遍历链表、删除链表节点\n 树、图\n 深度/广度优先遍历\n 数组\n 冒泡/选择/插入/归并/快速排序、顺序/二分搜索\n 时间复杂度\n 空间复杂度\n 常见 O(1) O(logN) O(N) O(N²) \nCheck out the documentation for the full list of runtime APIs."
},
{
"url": "/算法/堆.html",
"relativePath": "/算法/堆.html",
"frontmatter": {
"outline": "deep"
},
"title": "寻找第K大",
"date": "1970-01-01 00:00:00",
"capture": "寻找第K大\n思路: 分治思想,及快速选择算法或者使用小栈堆,即维护K个元素,堆顶为第K大\n```md\n<script setup\nimport { useData } from 'vitepress'\nconst { theme, page, frontmatter } = useData()\n</script>\n Results\n Theme Data\n<pre>{{ theme }}</pre>\n Page Data\n<pre>{{ page }}</pre>\n Page Frontmatter\n<pre>{{ "
},
{
"url": "/算法/字典.html",
"relativePath": "/算法/字典.html",
"frontmatter": {
"outline": "deep"
},
"title": "字典",
"date": "1970-01-01 00:00:00",
"capture": "字典\n 字典特性\n<pre\n与集合类似,字典也是一种存储唯一值的数据结构,但是是以键值对的形式来存储\nES6中的字典叫做Map\n</pre>\n```md\nconst m = new Map()\n//增 m.set()\nm.set('a','aa');\n//删 m.delete()\nm.set('b','bb')\nm.delete('b')\n//清空所有\nm.clear()\n//改\nm.set('a','aaa') //直接覆盖就行\n//查 m.get() get拿到的值\n```\n 两个数组的交集 LC349\n<pre>\n给定两个数组,编写一个函数来求出他们的交"
},
{
"url": "/算法/排序.html",
"relativePath": "/算法/排序.html",
"frontmatter": {
"outline": "deep"
},
"title": "寻找第K大",
"date": "1970-01-01 00:00:00",
"capture": "寻找第K大\n<pre\n<pre>输入:数组及数字k</pre>\n<pre>输出:第k大的数</pre>\n<pre>思路:nums是一个数组,我们可以先找k对应数的索引,即排序过后数的对应索引\n随后,我们通过快速选择配合分区来进行筛选\n首先确定left和right,partition中进行判断,可以以right为基准\n然后让j等于左边界,开始循环,每次增加时判断与right的大小\n当j对应的值小于基准值,则让其放到左区中,逻辑是 [num[i++],num[j]] = [num[j],num[i]]\n第一轮实际上i=j,i++是控"
},
{
"url": "/算法/数组.html",
"relativePath": "/算法/数组.html",
"frontmatter": {
"outline": "deep"
},
"title": "寻找第K大",
"date": "1970-01-01 00:00:00",
"capture": "寻找第K大\n思路: 分治思想,及快速选择算法或者使用小栈堆,即维护K个元素,堆顶为第K大\n```md\n<script setup\nimport { useData } from 'vitepress'\nconst { theme, page, frontmatter } = useData()\n</script>\n Results\n Theme Data\n<pre>{{ theme }}</pre>\n Page Data\n<pre>{{ page }}</pre>\n Page Frontmatter\n<pre>{{ "
},
{
"url": "/算法/栈.html",
"relativePath": "/算法/栈.html",
"frontmatter": {
"outline": "deep"
},
"title": "栈",
"date": "1970-01-01 00:00:00",
"capture": "栈\n ·栈是一个后进先出的数据结构\n ·JS中没有栈,但可以用Array实现栈的所有功能\n ·栈常用操作:push/pop/stack[stack.length-1]\n```md\n```\n 有效的括号(纯栈)\n 对于没有闭合的左括号,越靠后的左括号,其对应右括号越靠前\n```md\nfunction isvaild (s){\n if(s.length % 2 === 1) return false\n const stack = []\n for(let i =0;i<s.length ;i++){\n const c = s[i]\n if(c ="
},
{
"url": "/算法/树.html",
"relativePath": "/算法/树.html",
"frontmatter": {
"outline": "deep"
},
"title": "树",
"date": "1970-01-01 00:00:00",
"capture": "树\n<pre\n树是一种分层数据的抽象模型\n</pre>\n<pre>\n前端中常见的树包括:\nDOM树/级联选择/树形控件 \n</pre>\n<pre>\nJS中没有树,但是可以用Object和Array构建树\n树的常用操作:\n深度/广度优先遍历\n前中后序遍历\n</pre>\n<pre></pre>\n```\n```\n 深度/广度优先遍历\n 深度优先遍历\n<pre>\n尽可能深的搜索树的分支\n</pre>\n<pre>\n算法口诀:\n访问根节点\n对根节点的children挨个进行深度优先"
},
{
"url": "/算法/链表.html",
"relativePath": "/算法/链表.html",
"frontmatter": {
"outline": "deep"
},
"title": "链表",
"date": "1970-01-01 00:00:00",
"capture": "链表\n 链表是多个元素组成的列表\n 元素存储不连续,用next指针连在一起\n 遍历链表\n``` md\n let p = a;\n while(p){\n console.log(p.val)\n p = p.next\n }\n```\n 插入\n``` md\nconst e = {val:'e'}\nc.next = e;\ne.next = d;\n```\n 删除\n```\nc.next = d\n```\n 删除链表中的节点LC237\n 要求:请编写函数,使其可以删除某个链表中给定的非末尾节点,将只被给定要求被删除的节点\n 现有链表 -- head = [4,5,1,9] \n```\nfunctio"
},
{
"url": "/算法/队列.html",
"relativePath": "/算法/队列.html",
"frontmatter": {
"outline": "deep"
},
"title": "栈",
"date": "1970-01-01 00:00:00",
"capture": "栈\n ·栈是一个先进先出的数据结构\n ·JS中没有队列,但可以用Array实现队列的所有功能\n ·栈常用操作:push/shift/queue[queue.length-1]\n 使用场景\n 食堂排队打饭\n JS异步中的任务队列\n 计算最近请求次数\n 计算最近请求次数(LC933)\n 输入: input = [[],[1],[100],[3001],[3002]]\n 输出: [null,1,2,3,3]\n 解题步骤:新请求入队,3000ms 前发出的请求出队,队列长度即最近请求次数\n```md\nvar RecentCounter = function(){\n this.q = []\n}\nR"
},
{
"url": "/算法/集合.html",
"relativePath": "/算法/集合.html",
"frontmatter": {
"outline": "deep"
},
"title": "集合",
"date": "1970-01-01 00:00:00",
"capture": "集合\n 集合特性\n<pre\n一种无序且唯一的数据结构\nES6中有集合,名为Set\n常规操作:\n去重\n判断某元素是否在集合中,求交集\n</pre>\n```md\n//去重\nconst arr = [1,1,2,2];\nconst arr2 = [...new Set(arr)];\n//判断元素是否在集合中\nconst set = new Set(arr)\nconst has = set.has(1) //结果是boolean\n//求交集\nconst set2 = new Set([2,3]);\nconst set3 = new Set([...set].filter(ite"
},
{
"url": "/语音/api-examples.html",
"relativePath": "/语音/api-examples.html",
"frontmatter": {
"outline": "deep"
},
"title": "Runtime API Examples",
"date": "1970-01-01 00:00:00",
"capture": "Runtime API Examples\nThis page demonstrates usage of some of the runtime APIs provided by VitePress.\nThe main `useData()` API can be used to access site, theme, and page data for the current page. It works in both `.md` and `.vue` files:\n```md\n<script setup\nimport { useData } from 'vitepress'\ncon"
},
{
"url": "/面试/CSS/",
"relativePath": "/面试/CSS/",
"frontmatter": {
"outline": "deep"
},
"title": "CSS高频面试题",
"date": "1970-01-01 00:00:00",
"capture": "CSS高频面试题\nThis page demonstrates usage of some of the runtime APIs provided by VitePress.\nThe main `useData()` API can be used to access site, theme, and page data for the current page. It works in both `.md` and `.vue` files:\n```md\n```\n BFC的意义与用法\n Theme Data\n Page Data\n Page Frontmatter\n 常见布局方案及定位方式"
},
{
"url": "/面试/HTML/",
"relativePath": "/面试/HTML/",
"frontmatter": {
"outline": "deep"
},
"title": "HTML高频面试题",
"date": "1970-01-01 00:00:00",
"capture": "HTML高频面试题\nThis page demonstrates usage of some of the runtime APIs provided by VitePress.\nThe main `useData()` API can be used to access site, theme, and page data for the current page. It works in both `.md` and `.vue` files:\n```md\n```\n HTML语义化标签\n Theme Data\n Page Data\n Page Frontmatter\n HTML结构\n HT"
},
{
"url": "/面试/JavaScript/",
"relativePath": "/面试/JavaScript/",
"frontmatter": {
"outline": "deep"
},
"title": "JavaScript高频面试题",
"date": "1970-01-01 00:00:00",
"capture": "JavaScript高频面试题\nThis page demonstrates usage of some of the runtime APIs provided by VitePress.\nThe main `useData()` API can be used to access site, theme, and page data for the current page. It works in both `.md` and `.vue` files:\n```md\n```\n ES6+新特性\n Theme Data\n Page Data\n Page Frontmatter\n 闭包\n JS"
},
{
"url": "/面试/Nest/",
"relativePath": "/面试/Nest/",
"frontmatter": {
"outline": "deep"
},
"title": "工程化高频面试题",
"date": "1970-01-01 00:00:00",
"capture": "工程化高频面试题\nThis page demonstrates usage of some of the runtime APIs provided by VitePress.\nThe main `useData()` API can be used to access site, theme, and page data for the current page. It works in both `.md` and `.vue` files:\n```md\n```\n NestJS的底层原理\n IOC\n 依赖注入\n NestJS Module\n NestJS Controller\n NestJ"
},
{
"url": "/面试/Next/",
"relativePath": "/面试/Next/",
"frontmatter": {
"outline": "deep"
},
"title": "Nextjs 面试题",
"date": "1970-01-01 00:00:00",
"capture": "```md\n```\n Nextjs的优点\n Nextjs路由\n 文件夹路由\n 嵌套路由\n Nextjs优化\n 路由懒加载\n 图片懒加载\n 组件懒加载\n Nextjs 水合\n Nextjs 渲染\n SSR的实现\n SSG的实现\n CSR的实现\nCheck out the documentation for the full list of runtime APIs."
},
{
"url": "/面试/React/",
"relativePath": "/面试/React/",
"frontmatter": {
"outline": "deep"
},
"title": "React高频面试题",
"date": "1970-01-01 00:00:00",
"capture": "React高频面试题\nThis page demonstrates usage of some of the runtime APIs provided by VitePress.\nThe main `useData()` API can be used to access site, theme, and page data for the current page. It works in both `.md` and `.vue` files:\n```md\n```\n 虚拟DOM与Diff算法\n Diff算法的优化策略\n Theme Data\n<pre\n Page Data\n<"
},
{
"url": "/面试/SSE/",
"relativePath": "/面试/SSE/",
"frontmatter": {
"outline": "deep"
},
"title": "SSE流式输出",
"date": "1970-01-01 00:00:00",
"capture": "SSE流式输出\nThis page demonstrates usage of some of the runtime APIs provided by VitePress.\nThe main `useData()` API can be used to access site, theme, and page data for the current page. It works in both `.md` and `.vue` files:\n```md\n```\n SSE流式输出的概念\n SSE流式输出的原理\n SSE流式输出的实现\nCheck out the documentation f"
},
{
"url": "/面试/TypeScript/",
"relativePath": "/面试/TypeScript/",
"frontmatter": {
"outline": "deep"
},
"title": "TS面试题",
"date": "1970-01-01 00:00:00",
"capture": "TS面试题\nThis page demonstrates usage of some of the runtime APIs provided by VitePress.\nThe main `useData()` API can be used to access site, theme, and page data for the current page. It works in both `.md` and `.vue` files:\n```md\n```\n TS在项目中的使用\n Theme Data\n Page Data\n Page Frontmatter\n Interface和type"
},
{
"url": "/面试/前沿技术/",
"relativePath": "/面试/前沿技术/",
"frontmatter": {
"outline": "deep"
},
"title": "前沿技术面试题",
"date": "1970-01-01 00:00:00",
"capture": "前沿技术面试题\nThis page demonstrates usage of some of the runtime APIs provided by VitePress.\nThe main `useData()` API can be used to access site, theme, and page data for the current page. It works in both `.md` and `.vue` files:\n```md\n```\n WebAssembly\n 微前端\n 常用的微前端框架\n React Native /小程序开发\n AI大模型在前端的应用场景\nC"
},
{
"url": "/面试/工程化/",
"relativePath": "/面试/工程化/",
"frontmatter": {
"outline": "deep"
},
"title": "工程化高频面试题",
"date": "1970-01-01 00:00:00",
"capture": "工程化高频面试题\nThis page demonstrates usage of some of the runtime APIs provided by VitePress.\nThe main `useData()` API can be used to access site, theme, and page data for the current page. It works in both `.md` and `.vue` files:\n```md\n```\n Webpack\n loader和plugin的区别\n 自定义loader/plugin\n Vite\n Vite的热更新原理\n "
},
{
"url": "/面试/性能优化/",
"relativePath": "/面试/性能优化/",
"frontmatter": {
"outline": "deep"
},
"title": "性能优化面试题",
"date": "1970-01-01 00:00:00",
"capture": "性能优化面试题\nThis page demonstrates usage of some of the runtime APIs provided by VitePress.\nThe main `useData()` API can be used to access site, theme, and page data for the current page. It works in both `.md` and `.vue` files:\n```md\n```\n 代码优化\n 静态资源优化\n 组件优化\n 缓存优化\nCheck out the documentation for the"
},
{
"url": "/面试/浏览器/",
"relativePath": "/面试/浏览器/",
"frontmatter": {
"outline": "deep"
},
"title": "浏览器高频面试题",
"date": "1970-01-01 00:00:00",
"capture": "浏览器高频面试题\nThis page demonstrates usage of some of the runtime APIs provided by VitePress.\nThe main `useData()` API can be used to access site, theme, and page data for the current page. It works in both `.md` and `.vue` files:\n```md\n```\n 浏览器的垃圾回收机制\n 浏览器渲染流程\n 浏览器同源策略\n 浏览器性能指标\n Service Worker\n 如何实现 PWA"
},
{
"url": "/面试/计网/",
"relativePath": "/面试/计网/",
"frontmatter": {
"outline": "deep"
},
"title": "计网高频面试题",
"date": "1970-01-01 00:00:00",
"capture": "计网高频面试题\nThis page demonstrates usage of some of the runtime APIs provided by VitePress.\nThe main `useData()` API can be used to access site, theme, and page data for the current page. It works in both `.md` and `.vue` files:\n```md\n```\n 常见的网络攻击\n XSS\n CRSF\n Theme Data\n<pre\n Page Data\n<pre>{{ "
}
],
"groupPostsByYear": {
"1970 ": [
{
"url": "/markdown-examples.html",
"relativePath": "/markdown-examples.html",
"frontmatter": {},
"title": "Markdown Extension Examples",
"date": "1970-01-01 00:00:00",
"capture": "This page demonstrates some of the built-in markdown extensions provided by VitePress.\n Syntax Highlighting\nVitePress provides Syntax Highlighting powered by Shiki, with additional features like line-highlighting:\nInput\n````md\n```js{4}\nexport default {\n data () {\n return {\n msg: 'Highlighte"
},
{
"url": "/前端/",
"relativePath": "/前端/",
"frontmatter": {
"outline": "deep"
},
"title": "Runtime API Examples",
"date": "1970-01-01 00:00:00",
"capture": "Runtime API Examples\nThis page demonstrates usage of some of the runtime APIs provided by VitePress.\nThe main `useData()` API can be used to access site, theme, and page data for the current page. It works in both `.md` and `.vue` files:\n```md\n<script setup\nimport { useData } from 'vitepress'\ncon"
},
{
"url": "/前端/基础篇/",
"relativePath": "/前端/基础篇/",
"frontmatter": {
"outline": "deep"
},
"title": "工程化高频面试题",
"date": "1970-01-01 00:00:00",
"capture": "工程化高频面试题\nThis page demonstrates usage of some of the runtime APIs provided by VitePress.\nThe main `useData()` API can be used to access site, theme, and page data for the current page. It works in both `.md` and `.vue` files:\n```md\n```\n HTML\n CSS\n JS\nCheck out the documentation for the full list of "
},
{
"url": "/前端/框架篇/VUE/vue.html",
"relativePath": "/前端/框架篇/VUE/vue.html",
"frontmatter": {
"outline": "deep"
},
"title": "Vue",
"date": "1970-01-01 00:00:00",
"capture": "Vue\n 引入Vue\n```\n<script src=\"https://cdn.jsdelivr.net/npm/vue@2.7.16/dist/vue.js\"\n```\n 具体结构\n``` 页面结构\n<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n <meta charset=\"UTF-8\">\n <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\n <title>Document"
},
{
"url": "/前端/进阶篇/",
"relativePath": "/前端/进阶篇/",
"frontmatter": {
"outline": "deep"
},
"title": "工程化高频面试题",
"date": "1970-01-01 00:00:00",
"capture": "工程化高频面试题\nThis page demonstrates usage of some of the runtime APIs provided by VitePress.\nThe main `useData()` API can be used to access site, theme, and page data for the current page. It works in both `.md` and `.vue` files:\n```md\n```\n TS\n Webpack\n Vite\n Vue\n React\n Nodejs/Express/Fastify\n Nuxt.JS\n"
},
{
"url": "/后端/api-examples.html",
"relativePath": "/后端/api-examples.html",
"frontmatter": {
"outline": "deep"
},
"title": "Runtime API Examples",
"date": "1970-01-01 00:00:00",
"capture": "Runtime API Examples\nThis page demonstrates usage of some of the runtime APIs provided by VitePress.\nThe main `useData()` API can be used to access site, theme, and page data for the current page. It works in both `.md` and `.vue` files:\n```md\n<script setup\nimport { useData } from 'vitepress'\ncon"
},
{
"url": "/小说/三灾.html",
"relativePath": "/小说/三灾.html",
"frontmatter": {},
"title": "html",
"date": "1970-01-01 00:00:00",
"capture": ""
},
{
"url": "/小说/回魂.html",
"relativePath": "/小说/回魂.html",
"frontmatter": {},
"title": "html",
"date": "1970-01-01 00:00:00",
"capture": ""
},
{
"url": "/小说/度苦记.html",
"relativePath": "/小说/度苦记.html",
"frontmatter": {},
"title": "html",
"date": "1970-01-01 00:00:00",
"capture": ""
},
{
"url": "/小说/梦游记.html",
"relativePath": "/小说/梦游记.html",
"frontmatter": {
"outline": "deep"
},
"title": "Runtime API Examples",
"date": "1970-01-01 00:00:00",
"capture": "Runtime API Examples\nThis page demonstrates usage of some of the runtime APIs provided by VitePress.\nThe main `useData()` API can be used to access site, theme, and page data for the current page. It works in both `.md` and `.vue` files:\n```md\n<script setup\nimport { useData } from 'vitepress'\ncon"
},
{
"url": "/小说/死环.html",
"relativePath": "/小说/死环.html",
"frontmatter": {},
"title": "html",
"date": "1970-01-01 00:00:00",
"capture": ""
},
{
"url": "/小说/火种.html",
"relativePath": "/小说/火种.html",
"frontmatter": {},
"title": "html",
"date": "1970-01-01 00:00:00",
"capture": ""
},
{
"url": "/小说/盗亦有道.html",
"relativePath": "/小说/盗亦有道.html",
"frontmatter": {},
"title": "html",
"date": "1970-01-01 00:00:00",
"capture": ""
},
{
"url": "/小说/返生.html",
"relativePath": "/小说/返生.html",
"frontmatter": {},
"title": "html",
"date": "1970-01-01 00:00:00",
"capture": ""
},
{
"url": "/小说/长生贼.html",
"relativePath": "/小说/长生贼.html",
"frontmatter": {},
"title": "html",
"date": "1970-01-01 00:00:00",
"capture": ""
},
{
"url": "/算法/前端算法.html",
"relativePath": "/算法/前端算法.html",
"frontmatter": {
"outline": "deep"
},
"title": "链表",
"date": "1970-01-01 00:00:00",
"capture": "链表\n 反转链表\n<pre\n<pre>输入:head头节点</pre>\n<pre>输出:反转后新头节点</pre>\n 思路及代码\n<pre>思路:记录,反转\n给前任赋null,现任是头节点\n然后还有现任的时候,先把下任存好(const next = curr.next)\n让现任的next指针去找前任,即 curr.next = prev\n把前任换成现任, prev = curr\n把现任换成下一任, curr = next\n</pre>\n``` JS\nfunction reverseList(head){ //传入头"
},
{
"url": "/算法/动态规划.html",
"relativePath": "/算法/动态规划.html",
"frontmatter": {
"outline": "deep"
},
"title": "寻找第K大",
"date": "1970-01-01 00:00:00",
"capture": "寻找第K大\n思路: 分治思想,及快速选择算法或者使用小栈堆,即维护K个元素,堆顶为第K大\n```md\n<script setup\nimport { useData } from 'vitepress'\nconst { theme, page, frontmatter } = useData()\n</script>\n Results\n Theme Data\n<pre>{{ theme }}</pre>\n Page Data\n<pre>{{ page }}</pre>\n Page Frontmatter\n<pre>{{ "
},
{
"url": "/算法/基础.html",
"relativePath": "/算法/基础.html",
"frontmatter": {
"outline": "deep"
},
"title": "算法基础",
"date": "1970-01-01 00:00:00",
"capture": "算法基础 \n```md\n```\n 数据结构\n 栈、队列、链表\n 集合、字典\n 树、堆、图\n 链表\n 遍历链表、删除链表节点\n 树、图\n 深度/广度优先遍历\n 数组\n 冒泡/选择/插入/归并/快速排序、顺序/二分搜索\n 时间复杂度\n 空间复杂度\n 常见 O(1) O(logN) O(N) O(N²) \nCheck out the documentation for the full list of runtime APIs."
},
{
"url": "/算法/堆.html",
"relativePath": "/算法/堆.html",
"frontmatter": {
"outline": "deep"
},
"title": "寻找第K大",
"date": "1970-01-01 00:00:00",
"capture": "寻找第K大\n思路: 分治思想,及快速选择算法或者使用小栈堆,即维护K个元素,堆顶为第K大\n```md\n<script setup\nimport { useData } from 'vitepress'\nconst { theme, page, frontmatter } = useData()\n</script>\n Results\n Theme Data\n<pre>{{ theme }}</pre>\n Page Data\n<pre>{{ page }}</pre>\n Page Frontmatter\n<pre>{{ "
},
{
"url": "/算法/字典.html",
"relativePath": "/算法/字典.html",
"frontmatter": {
"outline": "deep"
},
"title": "字典",
"date": "1970-01-01 00:00:00",
"capture": "字典\n 字典特性\n<pre\n与集合类似,字典也是一种存储唯一值的数据结构,但是是以键值对的形式来存储\nES6中的字典叫做Map\n</pre>\n```md\nconst m = new Map()\n//增 m.set()\nm.set('a','aa');\n//删 m.delete()\nm.set('b','bb')\nm.delete('b')\n//清空所有\nm.clear()\n//改\nm.set('a','aaa') //直接覆盖就行\n//查 m.get() get拿到的值\n```\n 两个数组的交集 LC349\n<pre>\n给定两个数组,编写一个函数来求出他们的交"
},
{
"url": "/算法/排序.html",
"relativePath": "/算法/排序.html",
"frontmatter": {
"outline": "deep"
},
"title": "寻找第K大",
"date": "1970-01-01 00:00:00",
"capture": "寻找第K大\n<pre\n<pre>输入:数组及数字k</pre>\n<pre>输出:第k大的数</pre>\n<pre>思路:nums是一个数组,我们可以先找k对应数的索引,即排序过后数的对应索引\n随后,我们通过快速选择配合分区来进行筛选\n首先确定left和right,partition中进行判断,可以以right为基准\n然后让j等于左边界,开始循环,每次增加时判断与right的大小\n当j对应的值小于基准值,则让其放到左区中,逻辑是 [num[i++],num[j]] = [num[j],num[i]]\n第一轮实际上i=j,i++是控"
},
{
"url": "/算法/数组.html",
"relativePath": "/算法/数组.html",
"frontmatter": {
"outline": "deep"
},
"title": "寻找第K大",
"date": "1970-01-01 00:00:00",
"capture": "寻找第K大\n思路: 分治思想,及快速选择算法或者使用小栈堆,即维护K个元素,堆顶为第K大\n```md\n<script setup\nimport { useData } from 'vitepress'\nconst { theme, page, frontmatter } = useData()\n</script>\n Results\n Theme Data\n<pre>{{ theme }}</pre>\n Page Data\n<pre>{{ page }}</pre>\n Page Frontmatter\n<pre>{{ "
},
{
"url": "/算法/栈.html",
"relativePath": "/算法/栈.html",
"frontmatter": {
"outline": "deep"
},
"title": "栈",
"date": "1970-01-01 00:00:00",
"capture": "栈\n ·栈是一个后进先出的数据结构\n ·JS中没有栈,但可以用Array实现栈的所有功能\n ·栈常用操作:push/pop/stack[stack.length-1]\n```md\n```\n 有效的括号(纯栈)\n 对于没有闭合的左括号,越靠后的左括号,其对应右括号越靠前\n```md\nfunction isvaild (s){\n if(s.length % 2 === 1) return false\n const stack = []\n for(let i =0;i<s.length ;i++){\n const c = s[i]\n if(c ="
},
{
"url": "/算法/树.html",
"relativePath": "/算法/树.html",
"frontmatter": {
"outline": "deep"
},
"title": "树",
"date": "1970-01-01 00:00:00",
"capture": "树\n<pre\n树是一种分层数据的抽象模型\n</pre>\n<pre>\n前端中常见的树包括:\nDOM树/级联选择/树形控件 \n</pre>\n<pre>\nJS中没有树,但是可以用Object和Array构建树\n树的常用操作:\n深度/广度优先遍历\n前中后序遍历\n</pre>\n<pre></pre>\n```\n```\n 深度/广度优先遍历\n 深度优先遍历\n<pre>\n尽可能深的搜索树的分支\n</pre>\n<pre>\n算法口诀:\n访问根节点\n对根节点的children挨个进行深度优先"
},
{
"url": "/算法/链表.html",
"relativePath": "/算法/链表.html",
"frontmatter": {
"outline": "deep"
},
"title": "链表",
"date": "1970-01-01 00:00:00",
"capture": "链表\n 链表是多个元素组成的列表\n 元素存储不连续,用next指针连在一起\n 遍历链表\n``` md\n let p = a;\n while(p){\n console.log(p.val)\n p = p.next\n }\n```\n 插入\n``` md\nconst e = {val:'e'}\nc.next = e;\ne.next = d;\n```\n 删除\n```\nc.next = d\n```\n 删除链表中的节点LC237\n 要求:请编写函数,使其可以删除某个链表中给定的非末尾节点,将只被给定要求被删除的节点\n 现有链表 -- head = [4,5,1,9] \n```\nfunctio"
},
{
"url": "/算法/队列.html",
"relativePath": "/算法/队列.html",
"frontmatter": {
"outline": "deep"
},
"title": "栈",
"date": "1970-01-01 00:00:00",
"capture": "栈\n ·栈是一个先进先出的数据结构\n ·JS中没有队列,但可以用Array实现队列的所有功能\n ·栈常用操作:push/shift/queue[queue.length-1]\n 使用场景\n 食堂排队打饭\n JS异步中的任务队列\n 计算最近请求次数\n 计算最近请求次数(LC933)\n 输入: input = [[],[1],[100],[3001],[3002]]\n 输出: [null,1,2,3,3]\n 解题步骤:新请求入队,3000ms 前发出的请求出队,队列长度即最近请求次数\n```md\nvar RecentCounter = function(){\n this.q = []\n}\nR"
},
{
"url": "/算法/集合.html",
"relativePath": "/算法/集合.html",
"frontmatter": {
"outline": "deep"
},
"title": "集合",
"date": "1970-01-01 00:00:00",
"capture": "集合\n 集合特性\n<pre\n一种无序且唯一的数据结构\nES6中有集合,名为Set\n常规操作:\n去重\n判断某元素是否在集合中,求交集\n</pre>\n```md\n//去重\nconst arr = [1,1,2,2];\nconst arr2 = [...new Set(arr)];\n//判断元素是否在集合中\nconst set = new Set(arr)\nconst has = set.has(1) //结果是boolean\n//求交集\nconst set2 = new Set([2,3]);\nconst set3 = new Set([...set].filter(ite"
},
{
"url": "/语音/api-examples.html",
"relativePath": "/语音/api-examples.html",
"frontmatter": {
"outline": "deep"
},
"title": "Runtime API Examples",
"date": "1970-01-01 00:00:00",
"capture": "Runtime API Examples\nThis page demonstrates usage of some of the runtime APIs provided by VitePress.\nThe main `useData()` API can be used to access site, theme, and page data for the current page. It works in both `.md` and `.vue` files:\n```md\n<script setup\nimport { useData } from 'vitepress'\ncon"
},
{
"url": "/面试/CSS/",
"relativePath": "/面试/CSS/",
"frontmatter": {
"outline": "deep"
},
"title": "CSS高频面试题",
"date": "1970-01-01 00:00:00",
"capture": "CSS高频面试题\nThis page demonstrates usage of some of the runtime APIs provided by VitePress.\nThe main `useData()` API can be used to access site, theme, and page data for the current page. It works in both `.md` and `.vue` files:\n```md\n```\n BFC的意义与用法\n Theme Data\n Page Data\n Page Frontmatter\n 常见布局方案及定位方式"
},
{
"url": "/面试/HTML/",
"relativePath": "/面试/HTML/",
"frontmatter": {
"outline": "deep"
},
"title": "HTML高频面试题",
"date": "1970-01-01 00:00:00",
"capture": "HTML高频面试题\nThis page demonstrates usage of some of the runtime APIs provided by VitePress.\nThe main `useData()` API can be used to access site, theme, and page data for the current page. It works in both `.md` and `.vue` files:\n```md\n```\n HTML语义化标签\n Theme Data\n Page Data\n Page Frontmatter\n HTML结构\n HT"
},
{
"url": "/面试/JavaScript/",
"relativePath": "/面试/JavaScript/",
"frontmatter": {
"outline": "deep"
},
"title": "JavaScript高频面试题",
"date": "1970-01-01 00:00:00",
"capture": "JavaScript高频面试题\nThis page demonstrates usage of some of the runtime APIs provided by VitePress.\nThe main `useData()` API can be used to access site, theme, and page data for the current page. It works in both `.md` and `.vue` files:\n```md\n```\n ES6+新特性\n Theme Data\n Page Data\n Page Frontmatter\n 闭包\n JS"
},
{
"url": "/面试/Nest/",
"relativePath": "/面试/Nest/",
"frontmatter": {
"outline": "deep"
},
"title": "工程化高频面试题",
"date": "1970-01-01 00:00:00",
"capture": "工程化高频面试题\nThis page demonstrates usage of some of the runtime APIs provided by VitePress.\nThe main `useData()` API can be used to access site, theme, and page data for the current page. It works in both `.md` and `.vue` files:\n```md\n```\n NestJS的底层原理\n IOC\n 依赖注入\n NestJS Module\n NestJS Controller\n NestJ"
},
{
"url": "/面试/Next/",
"relativePath": "/面试/Next/",
"frontmatter": {
"outline": "deep"
},
"title": "Nextjs 面试题",
"date": "1970-01-01 00:00:00",
"capture": "```md\n```\n Nextjs的优点\n Nextjs路由\n 文件夹路由\n 嵌套路由\n Nextjs优化\n 路由懒加载\n 图片懒加载\n 组件懒加载\n Nextjs 水合\n Nextjs 渲染\n SSR的实现\n SSG的实现\n CSR的实现\nCheck out the documentation for the full list of runtime APIs."
},
{
"url": "/面试/React/",
"relativePath": "/面试/React/",
"frontmatter": {
"outline": "deep"
},
"title": "React高频面试题",
"date": "1970-01-01 00:00:00",
"capture": "React高频面试题\nThis page demonstrates usage of some of the runtime APIs provided by VitePress.\nThe main `useData()` API can be used to access site, theme, and page data for the current page. It works in both `.md` and `.vue` files:\n```md\n```\n 虚拟DOM与Diff算法\n Diff算法的优化策略\n Theme Data\n<pre\n Page Data\n<"
},
{
"url": "/面试/SSE/",
"relativePath": "/面试/SSE/",
"frontmatter": {
"outline": "deep"
},
"title": "SSE流式输出",
"date": "1970-01-01 00:00:00",
"capture": "SSE流式输出\nThis page demonstrates usage of some of the runtime APIs provided by VitePress.\nThe main `useData()` API can be used to access site, theme, and page data for the current page. It works in both `.md` and `.vue` files:\n```md\n```\n SSE流式输出的概念\n SSE流式输出的原理\n SSE流式输出的实现\nCheck out the documentation f"
},
{
"url": "/面试/TypeScript/",
"relativePath": "/面试/TypeScript/",
"frontmatter": {
"outline": "deep"
},
"title": "TS面试题",
"date": "1970-01-01 00:00:00",
"capture": "TS面试题\nThis page demonstrates usage of some of the runtime APIs provided by VitePress.\nThe main `useData()` API can be used to access site, theme, and page data for the current page. It works in both `.md` and `.vue` files:\n```md\n```\n TS在项目中的使用\n Theme Data\n Page Data\n Page Frontmatter\n Interface和type"
},
{
"url": "/面试/前沿技术/",
"relativePath": "/面试/前沿技术/",
"frontmatter": {
"outline": "deep"
},
"title": "前沿技术面试题",
"date": "1970-01-01 00:00:00",
"capture": "前沿技术面试题\nThis page demonstrates usage of some of the runtime APIs provided by VitePress.\nThe main `useData()` API can be used to access site, theme, and page data for the current page. It works in both `.md` and `.vue` files:\n```md\n```\n WebAssembly\n 微前端\n 常用的微前端框架\n React Native /小程序开发\n AI大模型在前端的应用场景\nC"
},
{
"url": "/面试/工程化/",
"relativePath": "/面试/工程化/",
"frontmatter": {
"outline": "deep"
},
"title": "工程化高频面试题",
"date": "1970-01-01 00:00:00",
"capture": "工程化高频面试题\nThis page demonstrates usage of some of the runtime APIs provided by VitePress.\nThe main `useData()` API can be used to access site, theme, and page data for the current page. It works in both `.md` and `.vue` files:\n```md\n```\n Webpack\n loader和plugin的区别\n 自定义loader/plugin\n Vite\n Vite的热更新原理\n "
},
{
"url": "/面试/性能优化/",
"relativePath": "/面试/性能优化/",
"frontmatter": {
"outline": "deep"
},
"title": "性能优化面试题",
"date": "1970-01-01 00:00:00",
"capture": "性能优化面试题\nThis page demonstrates usage of some of the runtime APIs provided by VitePress.\nThe main `useData()` API can be used to access site, theme, and page data for the current page. It works in both `.md` and `.vue` files:\n```md\n```\n 代码优化\n 静态资源优化\n 组件优化\n 缓存优化\nCheck out the documentation for the"
},
{
"url": "/面试/浏览器/",
"relativePath": "/面试/浏览器/",
"frontmatter": {
"outline": "deep"
},
"title": "浏览器高频面试题",
"date": "1970-01-01 00:00:00",
"capture": "浏览器高频面试题\nThis page demonstrates usage of some of the runtime APIs provided by VitePress.\nThe main `useData()` API can be used to access site, theme, and page data for the current page. It works in both `.md` and `.vue` files:\n```md\n```\n 浏览器的垃圾回收机制\n 浏览器渲染流程\n 浏览器同源策略\n 浏览器性能指标\n Service Worker\n 如何实现 PWA"
},
{
"url": "/面试/计网/",
"relativePath": "/面试/计网/",
"frontmatter": {
"outline": "deep"
},
"title": "计网高频面试题",
"date": "1970-01-01 00:00:00",
"capture": "计网高频面试题\nThis page demonstrates usage of some of the runtime APIs provided by VitePress.\nThe main `useData()` API can be used to access site, theme, and page data for the current page. It works in both `.md` and `.vue` files:\n```md\n```\n 常见的网络攻击\n XSS\n CRSF\n Theme Data\n<pre\n Page Data\n<pre>{{ "
}
]
},
"groupPostsByYearMonth": {
"1970 ": {
"01": [
{
"url": "/markdown-examples.html",
"relativePath": "/markdown-examples.html",
"frontmatter": {},
"title": "Markdown Extension Examples",
"date": "1970-01-01 00:00:00",
"capture": "This page demonstrates some of the built-in markdown extensions provided by VitePress.\n Syntax Highlighting\nVitePress provides Syntax Highlighting powered by Shiki, with additional features like line-highlighting:\nInput\n````md\n```js{4}\nexport default {\n data () {\n return {\n msg: 'Highlighte"
},
{
"url": "/前端/",
"relativePath": "/前端/",
"frontmatter": {
"outline": "deep"
},
"title": "Runtime API Examples",
"date": "1970-01-01 00:00:00",
"capture": "Runtime API Examples\nThis page demonstrates usage of some of the runtime APIs provided by VitePress.\nThe main `useData()` API can be used to access site, theme, and page data for the current page. It works in both `.md` and `.vue` files:\n```md\n<script setup\nimport { useData } from 'vitepress'\ncon"
},
{
"url": "/前端/基础篇/",
"relativePath": "/前端/基础篇/",
"frontmatter": {
"outline": "deep"
},
"title": "工程化高频面试题",
"date": "1970-01-01 00:00:00",
"capture": "工程化高频面试题\nThis page demonstrates usage of some of the runtime APIs provided by VitePress.\nThe main `useData()` API can be used to access site, theme, and page data for the current page. It works in both `.md` and `.vue` files:\n```md\n```\n HTML\n CSS\n JS\nCheck out the documentation for the full list of "
},
{
"url": "/前端/框架篇/VUE/vue.html",
"relativePath": "/前端/框架篇/VUE/vue.html",
"frontmatter": {
"outline": "deep"
},
"title": "Vue",
"date": "1970-01-01 00:00:00",
"capture": "Vue\n 引入Vue\n```\n<script src=\"https://cdn.jsdelivr.net/npm/vue@2.7.16/dist/vue.js\"\n```\n 具体结构\n``` 页面结构\n<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n <meta charset=\"UTF-8\">\n <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\n <title>Document"
},
{
"url": "/前端/进阶篇/",
"relativePath": "/前端/进阶篇/",
"frontmatter": {
"outline": "deep"
},
"title": "工程化高频面试题",
"date": "1970-01-01 00:00:00",
"capture": "工程化高频面试题\nThis page demonstrates usage of some of the runtime APIs provided by VitePress.\nThe main `useData()` API can be used to access site, theme, and page data for the current page. It works in both `.md` and `.vue` files:\n```md\n```\n TS\n Webpack\n Vite\n Vue\n React\n Nodejs/Express/Fastify\n Nuxt.JS\n"
},
{
"url": "/后端/api-examples.html",
"relativePath": "/后端/api-examples.html",
"frontmatter": {
"outline": "deep"
},
"title": "Runtime API Examples",
"date": "1970-01-01 00:00:00",
"capture": "Runtime API Examples\nThis page demonstrates usage of some of the runtime APIs provided by VitePress.\nThe main `useData()` API can be used to access site, theme, and page data for the current page. It works in both `.md` and `.vue` files:\n```md\n<script setup\nimport { useData } from 'vitepress'\ncon"
},
{
"url": "/小说/三灾.html",
"relativePath": "/小说/三灾.html",
"frontmatter": {},
"title": "html",
"date": "1970-01-01 00:00:00",
"capture": ""
},
{
"url": "/小说/回魂.html",
"relativePath": "/小说/回魂.html",
"frontmatter": {},
"title": "html",
"date": "1970-01-01 00:00:00",
"capture": ""
},
{
"url": "/小说/度苦记.html",
"relativePath": "/小说/度苦记.html",
"frontmatter": {},
"title": "html",
"date": "1970-01-01 00:00:00",
"capture": ""
},
{
"url": "/小说/梦游记.html",
"relativePath": "/小说/梦游记.html",
"frontmatter": {
"outline": "deep"
},
"title": "Runtime API Examples",
"date": "1970-01-01 00:00:00",
"capture": "Runtime API Examples\nThis page demonstrates usage of some of the runtime APIs provided by VitePress.\nThe main `useData()` API can be used to access site, theme, and page data for the current page. It works in both `.md` and `.vue` files:\n```md\n<script setup\nimport { useData } from 'vitepress'\ncon"
},
{
"url": "/小说/死环.html",
"relativePath": "/小说/死环.html",
"frontmatter": {},
"title": "html",
"date": "1970-01-01 00:00:00",
"capture": ""
},
{
"url": "/小说/火种.html",
"relativePath": "/小说/火种.html",
"frontmatter": {},
"title": "html",
"date": "1970-01-01 00:00:00",
"capture": ""
},
{
"url": "/小说/盗亦有道.html",
"relativePath": "/小说/盗亦有道.html",
"frontmatter": {},
"title": "html",
"date": "1970-01-01 00:00:00",
"capture": ""
},
{
"url": "/小说/返生.html",
"relativePath": "/小说/返生.html",
"frontmatter": {},
"title": "html",
"date": "1970-01-01 00:00:00",
"capture": ""
},
{
"url": "/小说/长生贼.html",
"relativePath": "/小说/长生贼.html",
"frontmatter": {},
"title": "html",
"date": "1970-01-01 00:00:00",
"capture": ""
},
{
"url": "/算法/前端算法.html",
"relativePath": "/算法/前端算法.html",
"frontmatter": {
"outline": "deep"
},
"title": "链表",
"date": "1970-01-01 00:00:00",
"capture": "链表\n 反转链表\n<pre\n<pre>输入:head头节点</pre>\n<pre>输出:反转后新头节点</pre>\n 思路及代码\n<pre>思路:记录,反转\n给前任赋null,现任是头节点\n然后还有现任的时候,先把下任存好(const next = curr.next)\n让现任的next指针去找前任,即 curr.next = prev\n把前任换成现任, prev = curr\n把现任换成下一任, curr = next\n</pre>\n``` JS\nfunction reverseList(head){ //传入头"
},
{
"url": "/算法/动态规划.html",
"relativePath": "/算法/动态规划.html",
"frontmatter": {
"outline": "deep"
},
"title": "寻找第K大",
"date": "1970-01-01 00:00:00",
"capture": "寻找第K大\n思路: 分治思想,及快速选择算法或者使用小栈堆,即维护K个元素,堆顶为第K大\n```md\n<script setup\nimport { useData } from 'vitepress'\nconst { theme, page, frontmatter } = useData()\n</script>\n Results\n Theme Data\n<pre>{{ theme }}</pre>\n Page Data\n<pre>{{ page }}</pre>\n Page Frontmatter\n<pre>{{ "
},
{
"url": "/算法/基础.html",
"relativePath": "/算法/基础.html",
"frontmatter": {
"outline": "deep"
},
"title": "算法基础",
"date": "1970-01-01 00:00:00",
"capture": "算法基础 \n```md\n```\n 数据结构\n 栈、队列、链表\n 集合、字典\n 树、堆、图\n 链表\n 遍历链表、删除链表节点\n 树、图\n 深度/广度优先遍历\n 数组\n 冒泡/选择/插入/归并/快速排序、顺序/二分搜索\n 时间复杂度\n 空间复杂度\n 常见 O(1) O(logN) O(N) O(N²) \nCheck out the documentation for the full list of runtime APIs."
},
{
"url": "/算法/堆.html",
"relativePath": "/算法/堆.html",
"frontmatter": {
"outline": "deep"
},
"title": "寻找第K大",
"date": "1970-01-01 00:00:00",
"capture": "寻找第K大\n思路: 分治思想,及快速选择算法或者使用小栈堆,即维护K个元素,堆顶为第K大\n```md\n<script setup\nimport { useData } from 'vitepress'\nconst { theme, page, frontmatter } = useData()\n</script>\n Results\n Theme Data\n<pre>{{ theme }}</pre>\n Page Data\n<pre>{{ page }}</pre>\n Page Frontmatter\n<pre>{{ "
},
{
"url": "/算法/字典.html",
"relativePath": "/算法/字典.html",
"frontmatter": {
"outline": "deep"
},
"title": "字典",
"date": "1970-01-01 00:00:00",
"capture": "字典\n 字典特性\n<pre\n与集合类似,字典也是一种存储唯一值的数据结构,但是是以键值对的形式来存储\nES6中的字典叫做Map\n</pre>\n```md\nconst m = new Map()\n//增 m.set()\nm.set('a','aa');\n//删 m.delete()\nm.set('b','bb')\nm.delete('b')\n//清空所有\nm.clear()\n//改\nm.set('a','aaa') //直接覆盖就行\n//查 m.get() get拿到的值\n```\n 两个数组的交集 LC349\n<pre>\n给定两个数组,编写一个函数来求出他们的交"
},
{
"url": "/算法/排序.html",
"relativePath": "/算法/排序.html",
"frontmatter": {
"outline": "deep"
},
"title": "寻找第K大",
"date": "1970-01-01 00:00:00",
"capture": "寻找第K大\n<pre\n<pre>输入:数组及数字k</pre>\n<pre>输出:第k大的数</pre>\n<pre>思路:nums是一个数组,我们可以先找k对应数的索引,即排序过后数的对应索引\n随后,我们通过快速选择配合分区来进行筛选\n首先确定left和right,partition中进行判断,可以以right为基准\n然后让j等于左边界,开始循环,每次增加时判断与right的大小\n当j对应的值小于基准值,则让其放到左区中,逻辑是 [num[i++],num[j]] = [num[j],num[i]]\n第一轮实际上i=j,i++是控"
},
{
"url": "/算法/数组.html",
"relativePath": "/算法/数组.html",
"frontmatter": {
"outline": "deep"
},
"title": "寻找第K大",
"date": "1970-01-01 00:00:00",
"capture": "寻找第K大\n思路: 分治思想,及快速选择算法或者使用小栈堆,即维护K个元素,堆顶为第K大\n```md\n<script setup\nimport { useData } from 'vitepress'\nconst { theme, page, frontmatter } = useData()\n</script>\n Results\n Theme Data\n<pre>{{ theme }}</pre>\n Page Data\n<pre>{{ page }}</pre>\n Page Frontmatter\n<pre>{{ "
},
{
"url": "/算法/栈.html",
"relativePath": "/算法/栈.html",
"frontmatter": {
"outline": "deep"
},
"title": "栈",
"date": "1970-01-01 00:00:00",
"capture": "栈\n ·栈是一个后进先出的数据结构\n ·JS中没有栈,但可以用Array实现栈的所有功能\n ·栈常用操作:push/pop/stack[stack.length-1]\n```md\n```\n 有效的括号(纯栈)\n 对于没有闭合的左括号,越靠后的左括号,其对应右括号越靠前\n```md\nfunction isvaild (s){\n if(s.length % 2 === 1) return false\n const stack = []\n for(let i =0;i<s.length ;i++){\n const c = s[i]\n if(c ="
},
{
"url": "/算法/树.html",
"relativePath": "/算法/树.html",
"frontmatter": {
"outline": "deep"
},
"title": "树",
"date": "1970-01-01 00:00:00",
"capture": "树\n<pre\n树是一种分层数据的抽象模型\n</pre>\n<pre>\n前端中常见的树包括:\nDOM树/级联选择/树形控件 \n</pre>\n<pre>\nJS中没有树,但是可以用Object和Array构建树\n树的常用操作:\n深度/广度优先遍历\n前中后序遍历\n</pre>\n<pre></pre>\n```\n```\n 深度/广度优先遍历\n 深度优先遍历\n<pre>\n尽可能深的搜索树的分支\n</pre>\n<pre>\n算法口诀:\n访问根节点\n对根节点的children挨个进行深度优先"
},
{
"url": "/算法/链表.html",
"relativePath": "/算法/链表.html",
"frontmatter": {
"outline": "deep"
},
"title": "链表",
"date": "1970-01-01 00:00:00",
"capture": "链表\n 链表是多个元素组成的列表\n 元素存储不连续,用next指针连在一起\n 遍历链表\n``` md\n let p = a;\n while(p){\n console.log(p.val)\n p = p.next\n }\n```\n 插入\n``` md\nconst e = {val:'e'}\nc.next = e;\ne.next = d;\n```\n 删除\n```\nc.next = d\n```\n 删除链表中的节点LC237\n 要求:请编写函数,使其可以删除某个链表中给定的非末尾节点,将只被给定要求被删除的节点\n 现有链表 -- head = [4,5,1,9] \n```\nfunctio"
},
{
"url": "/算法/队列.html",
"relativePath": "/算法/队列.html",
"frontmatter": {
"outline": "deep"
},
"title": "栈",
"date": "1970-01-01 00:00:00",
"capture": "栈\n ·栈是一个先进先出的数据结构\n ·JS中没有队列,但可以用Array实现队列的所有功能\n ·栈常用操作:push/shift/queue[queue.length-1]\n 使用场景\n 食堂排队打饭\n JS异步中的任务队列\n 计算最近请求次数\n 计算最近请求次数(LC933)\n 输入: input = [[],[1],[100],[3001],[3002]]\n 输出: [null,1,2,3,3]\n 解题步骤:新请求入队,3000ms 前发出的请求出队,队列长度即最近请求次数\n```md\nvar RecentCounter = function(){\n this.q = []\n}\nR"
},
{
"url": "/算法/集合.html",
"relativePath": "/算法/集合.html",
"frontmatter": {
"outline": "deep"
},
"title": "集合",
"date": "1970-01-01 00:00:00",
"capture": "集合\n 集合特性\n<pre\n一种无序且唯一的数据结构\nES6中有集合,名为Set\n常规操作:\n去重\n判断某元素是否在集合中,求交集\n</pre>\n```md\n//去重\nconst arr = [1,1,2,2];\nconst arr2 = [...new Set(arr)];\n//判断元素是否在集合中\nconst set = new Set(arr)\nconst has = set.has(1) //结果是boolean\n//求交集\nconst set2 = new Set([2,3]);\nconst set3 = new Set([...set].filter(ite"
},
{
"url": "/语音/api-examples.html",
"relativePath": "/语音/api-examples.html",
"frontmatter": {
"outline": "deep"
},
"title": "Runtime API Examples",
"date": "1970-01-01 00:00:00",
"capture": "Runtime API Examples\nThis page demonstrates usage of some of the runtime APIs provided by VitePress.\nThe main `useData()` API can be used to access site, theme, and page data for the current page. It works in both `.md` and `.vue` files:\n```md\n<script setup\nimport { useData } from 'vitepress'\ncon"
},
{
"url": "/面试/CSS/",
"relativePath": "/面试/CSS/",
"frontmatter": {
"outline": "deep"
},
"title": "CSS高频面试题",
"date": "1970-01-01 00:00:00",
"capture": "CSS高频面试题\nThis page demonstrates usage of some of the runtime APIs provided by VitePress.\nThe main `useData()` API can be used to access site, theme, and page data for the current page. It works in both `.md` and `.vue` files:\n```md\n```\n BFC的意义与用法\n Theme Data\n Page Data\n Page Frontmatter\n 常见布局方案及定位方式"
},
{
"url": "/面试/HTML/",
"relativePath": "/面试/HTML/",
"frontmatter": {
"outline": "deep"
},
"title": "HTML高频面试题",
"date": "1970-01-01 00:00:00",
"capture": "HTML高频面试题\nThis page demonstrates usage of some of the runtime APIs provided by VitePress.\nThe main `useData()` API can be used to access site, theme, and page data for the current page. It works in both `.md` and `.vue` files:\n```md\n```\n HTML语义化标签\n Theme Data\n Page Data\n Page Frontmatter\n HTML结构\n HT"
},
{
"url": "/面试/JavaScript/",
"relativePath": "/面试/JavaScript/",
"frontmatter": {
"outline": "deep"
},
"title": "JavaScript高频面试题",
"date": "1970-01-01 00:00:00",
"capture": "JavaScript高频面试题\nThis page demonstrates usage of some of the runtime APIs provided by VitePress.\nThe main `useData()` API can be used to access site, theme, and page data for the current page. It works in both `.md` and `.vue` files:\n```md\n```\n ES6+新特性\n Theme Data\n Page Data\n Page Frontmatter\n 闭包\n JS"
},
{
"url": "/面试/Nest/",
"relativePath": "/面试/Nest/",
"frontmatter": {
"outline": "deep"
},
"title": "工程化高频面试题",
"date": "1970-01-01 00:00:00",
"capture": "工程化高频面试题\nThis page demonstrates usage of some of the runtime APIs provided by VitePress.\nThe main `useData()` API can be used to access site, theme, and page data for the current page. It works in both `.md` and `.vue` files:\n```md\n```\n NestJS的底层原理\n IOC\n 依赖注入\n NestJS Module\n NestJS Controller\n NestJ"
},
{
"url": "/面试/Next/",
"relativePath": "/面试/Next/",
"frontmatter": {
"outline": "deep"
},
"title": "Nextjs 面试题",
"date": "1970-01-01 00:00:00",
"capture": "```md\n```\n Nextjs的优点\n Nextjs路由\n 文件夹路由\n 嵌套路由\n Nextjs优化\n 路由懒加载\n 图片懒加载\n 组件懒加载\n Nextjs 水合\n Nextjs 渲染\n SSR的实现\n SSG的实现\n CSR的实现\nCheck out the documentation for the full list of runtime APIs."
},
{
"url": "/面试/React/",
"relativePath": "/面试/React/",
"frontmatter": {
"outline": "deep"
},
"title": "React高频面试题",
"date": "1970-01-01 00:00:00",
"capture": "React高频面试题\nThis page demonstrates usage of some of the runtime APIs provided by VitePress.\nThe main `useData()` API can be used to access site, theme, and page data for the current page. It works in both `.md` and `.vue` files:\n```md\n```\n 虚拟DOM与Diff算法\n Diff算法的优化策略\n Theme Data\n<pre\n Page Data\n<"
},
{
"url": "/面试/SSE/",
"relativePath": "/面试/SSE/",
"frontmatter": {
"outline": "deep"
},
"title": "SSE流式输出",
"date": "1970-01-01 00:00:00",
"capture": "SSE流式输出\nThis page demonstrates usage of some of the runtime APIs provided by VitePress.\nThe main `useData()` API can be used to access site, theme, and page data for the current page. It works in both `.md` and `.vue` files:\n```md\n```\n SSE流式输出的概念\n SSE流式输出的原理\n SSE流式输出的实现\nCheck out the documentation f"
},
{
"url": "/面试/TypeScript/",
"relativePath": "/面试/TypeScript/",
"frontmatter": {
"outline": "deep"
},
"title": "TS面试题",
"date": "1970-01-01 00:00:00",
"capture": "TS面试题\nThis page demonstrates usage of some of the runtime APIs provided by VitePress.\nThe main `useData()` API can be used to access site, theme, and page data for the current page. It works in both `.md` and `.vue` files:\n```md\n```\n TS在项目中的使用\n Theme Data\n Page Data\n Page Frontmatter\n Interface和type"
},
{
"url": "/面试/前沿技术/",
"relativePath": "/面试/前沿技术/",
"frontmatter": {
"outline": "deep"
},
"title": "前沿技术面试题",
"date": "1970-01-01 00:00:00",
"capture": "前沿技术面试题\nThis page demonstrates usage of some of the runtime APIs provided by VitePress.\nThe main `useData()` API can be used to access site, theme, and page data for the current page. It works in both `.md` and `.vue` files:\n```md\n```\n WebAssembly\n 微前端\n 常用的微前端框架\n React Native /小程序开发\n AI大模型在前端的应用场景\nC"
},
{
"url": "/面试/工程化/",
"relativePath": "/面试/工程化/",
"frontmatter": {
"outline": "deep"
},
"title": "工程化高频面试题",
"date": "1970-01-01 00:00:00",
"capture": "工程化高频面试题\nThis page demonstrates usage of some of the runtime APIs provided by VitePress.\nThe main `useData()` API can be used to access site, theme, and page data for the current page. It works in both `.md` and `.vue` files:\n```md\n```\n Webpack\n loader和plugin的区别\n 自定义loader/plugin\n Vite\n Vite的热更新原理\n "
},
{
"url": "/面试/性能优化/",
"relativePath": "/面试/性能优化/",
"frontmatter": {
"outline": "deep"
},
"title": "性能优化面试题",
"date": "1970-01-01 00:00:00",
"capture": "性能优化面试题\nThis page demonstrates usage of some of the runtime APIs provided by VitePress.\nThe main `useData()` API can be used to access site, theme, and page data for the current page. It works in both `.md` and `.vue` files:\n```md\n```\n 代码优化\n 静态资源优化\n 组件优化\n 缓存优化\nCheck out the documentation for the"
},
{
"url": "/面试/浏览器/",
"relativePath": "/面试/浏览器/",
"frontmatter": {
"outline": "deep"
},
"title": "浏览器高频面试题",
"date": "1970-01-01 00:00:00",
"capture": "浏览器高频面试题\nThis page demonstrates usage of some of the runtime APIs provided by VitePress.\nThe main `useData()` API can be used to access site, theme, and page data for the current page. It works in both `.md` and `.vue` files:\n```md\n```\n 浏览器的垃圾回收机制\n 浏览器渲染流程\n 浏览器同源策略\n 浏览器性能指标\n Service Worker\n 如何实现 PWA"
},
{
"url": "/面试/计网/",
"relativePath": "/面试/计网/",
"frontmatter": {
"outline": "deep"
},
"title": "计网高频面试题",
"date": "1970-01-01 00:00:00",
"capture": "计网高频面试题\nThis page demonstrates usage of some of the runtime APIs provided by VitePress.\nThe main `useData()` API can be used to access site, theme, and page data for the current page. It works in both `.md` and `.vue` files:\n```md\n```\n 常见的网络攻击\n XSS\n CRSF\n Theme Data\n<pre\n Page Data\n<pre>{{ "
}
]
}
},
"groupPosts": {
"categories": {},
"tags": {}
},
"groupCards": {
"categories": [],
"tags": []
}
}
}Page Data
{
"title": "Runtime API Examples",
"description": "",
"frontmatter": {
"outline": "deep"
},
"headers": [],
"relativePath": "语音/api-examples.md",
"filePath": "语音/api-examples.md"
}Page Frontmatter
{
"outline": "deep"
}More
Check out the documentation for the full list of runtime APIs.