[{"data":1,"prerenderedAt":1327},["ShallowReactive",2],{"blog-taxonomies":3,"blog-stats":507,"post-2025\u002F2025-12-25-关于链表(javascript)":1083},[4,11,16,21,25,29,36,39,44,47,52,58,63,66,71,76,80,84,87,93,96,101,105,110,113,117,122,127,132,136,141,143,146,151,155,157,162,165,169,173,176,179,183,186,190,193,197,200,205,208,211,214,219,222,228,234,237,239,245,249,253,256,260,266,271,276,281,283,287,290,293,298,301,304,306,308,311,314,316,318,321,327,332,337,342,347,352,354,356,358,361,365,367,369,371,374,376,378,381,386,390,393,396,400,404,407,411,413,415,417,421,423,425,428,431,433,435,437,439,441,443,446,448,450,454,456,459,461,463,465,467,469,471,473,477,483,486,488,491,493,495,497,499,501,503,505],{"category":5,"tags":6},"笔记",[7,8,9,10],"QQ","插件","LiteLoader","美化",{"category":12,"tags":13},"其他",[14,15,10],"博客","IP签名",{"category":17,"tags":18},"杂谈",[19,20],"互联网","观点",{"category":5,"tags":22},[14,23,24],"GitHub","数据可视化",{"category":5,"tags":26},[14,27,28],"访问统计","不蒜子",{"category":30,"tags":31},"工具",[32,33,34,35],"Python","爬虫","选课脚本","广州大学",{"category":5,"tags":37},[38,5],"数学分析",{"category":40,"tags":41},"算法",[42,40,43],"数据结构","线性表",{"category":40,"tags":45},[42,46],"复习",{"category":5,"tags":48},[49,50,51],"高等代数","线性代数","知识点",{"category":5,"tags":53},[14,54,55,56,57],"Typora","PicGo","图床","Markdown",{"category":30,"tags":59},[60,61,62],"Jupyter","工具配置","中文",{"category":30,"tags":64},[65,61,10],"VSCode",{"category":30,"tags":67},[68,69,70,35],"路由器","OpenWrt","校园网",{"category":12,"tags":72},[73,74,75],"网络协议","Wireshark","DEVP2P",{"category":5,"tags":77},[73,74,78,79],"Lua","解码器",{"category":5,"tags":81},[82,5,83],"常微分方程","数学",{"category":5,"tags":85},[86,5,83],"概率论",{"category":30,"tags":88},[89,90,91,92],"Docker","WSL","Windows","磁盘清理",{"category":30,"tags":94},[32,33,95,35],"课程表",{"category":5,"tags":97},[14,98,99,100],"Hexo","Gitalk","评论系统",{"category":5,"tags":102},[14,103,98,104],"Obsidian","写作工具",{"category":12,"tags":106},[107,108,109],"课题研究","泊松分布","参数估计",{"category":12,"tags":111},[107,108,109,112],"组会",{"category":12,"tags":114},[109,115,108,116],"IM模型","统计学",{"category":17,"tags":118},[119,120,121],"软考","网络规划","信息系统项目管理",{"category":30,"tags":123},[124,125,126],"Arch Linux","AppImage","Linux",{"category":5,"tags":128},[129,130,131],"编程语言","计算机科学","内存管理",{"category":5,"tags":133},[134,135],"Canvas","前端",{"category":5,"tags":137},[14,138,139,140],"GitHub Actions","Vite","部署",{"category":5,"tags":142},[135],{"category":5,"tags":144},[135,145],"系统设计",{"category":5,"tags":147},[135,148,149,150],"安全","XSS","CSRF",{"category":152,"tags":153},"项目",[134,154],"PixiJS",{"category":152,"tags":156},null,{"category":40,"tags":158},[42,159,160,161],"栈","队列","JavaScript",{"category":40,"tags":163},[42,164,161],"哈希表",{"category":5,"tags":166},[167,161,168],"ES6","Set",{"category":40,"tags":170},[40,171,172],"动态规划","背包问题",{"category":40,"tags":174},[40,175],"滑动窗口",{"category":40,"tags":177},[42,178,161],"链表",{"category":40,"tags":180},[40,181,161,182],"ACM","面试",{"category":40,"tags":184},[40,161,185],"数据类型转换",{"category":40,"tags":187},[42,188,178,189],"顺序表","TypeScript",{"category":5,"tags":191},[135,154,134,192],"渲染",{"category":5,"tags":194},[135,195,134,196],"富文本编辑","wangEditor",{"category":40,"tags":198},[199,40,178],"力扣",{"category":5,"tags":201},[202,203,204,91],"DNS","加密","网络安全",{"category":5,"tags":206},[135,207],"Axios",{"category":5,"tags":209},[135,207,189,210],"接口封装",{"category":5,"tags":212},[135,213,145],"JWT",{"category":152,"tags":215},[134,216,217,154,218],"画布","React","项目开发",{"category":17,"tags":220},[221],"日志",{"category":5,"tags":223},[224,225,226,227],"Neo4j","图数据库","中心度分析","PageRank",{"category":12,"tags":229},[230,231,232,233],"论文","机器学习","随机森林","保险欺诈",{"category":5,"tags":235},[236],"人工智能",{"category":5,"tags":238},[231,40,32],{"category":12,"tags":240},[241,242,243,244],"共识算法","最长链","区块链","算法设计",{"category":5,"tags":246},[161,247,248,135],"闭包","作用域",{"category":5,"tags":250},[14,138,251,252],"RSS","自动化",{"category":30,"tags":254},[89,90,91,255],"安装",{"category":30,"tags":257},[258,91,259],"MSYS2","开发环境",{"category":5,"tags":261},[262,263,264,265],"团队协作","Git","Commit规范","代码审查",{"category":30,"tags":267},[268,269,270],"oh-my-posh","终端美化","CLI",{"category":5,"tags":272},[273,274,275],"上下文工程","Agent","RAG",{"category":5,"tags":277},[278,279,280],"前端工程化","技术选型","工程基建",{"category":5,"tags":282},[275],{"category":5,"tags":284},[285,286],"SDD","规格驱动开发",{"category":5,"tags":288},[289],"neovim",{"category":5,"tags":291},[292],"技术写作",{"category":5,"tags":294},[295,32,296,89,297],"FastAPI","后端","工程实践",{"category":152,"tags":299},[274,300],"Harness Engineering",{"category":5,"tags":302},[303],"RFC",{"category":152,"tags":305},[274,300,275],{"category":152,"tags":307},[274],{"category":40,"tags":309},[199,40,161,310],"两数之和",{"category":40,"tags":312},[199,40,161,313],"双指针",{"category":40,"tags":315},[199,40,161,178],{"category":40,"tags":317},[199,40,161,175],{"category":40,"tags":319},[199,40,161,320],"回溯",{"category":5,"tags":322},[323,324,325,326],"分布式处理与计算","Spark","Scala","RDD",{"category":5,"tags":328},[323,329,330,331],"线性回归","逻辑回归","监督学习",{"category":5,"tags":333},[323,334,335,336],"数值优化","牛顿法","收敛性",{"category":5,"tags":338},[323,339,340,341],"PCA","数据降维","正则化",{"category":5,"tags":343},[323,344,345,346],"聚类","层次聚类","K-Means",{"category":5,"tags":348},[323,349,350,351],"随机模拟","统计推断","EM算法",{"category":5,"tags":353},[24],{"category":5,"tags":355},[24],{"category":5,"tags":357},[24],{"category":40,"tags":359},[42,360],"图论",{"category":40,"tags":362},[42,363,364],"树","二叉树",{"category":40,"tags":366},[42,160],{"category":40,"tags":368},[42],{"category":40,"tags":370},[42,159],{"category":40,"tags":372},[42,40,373],"复杂度分析",{"category":40,"tags":375},[42,43,178],{"category":40,"tags":377},[42,43,188],{"category":40,"tags":379},[42,380],"基础概念",{"category":17,"tags":382},[383,384,385],"随记","照片","高中",{"category":17,"tags":387},[383,388,389],"团建","战地",{"category":17,"tags":391},[383,392],"生活",{"category":17,"tags":394},[383,395],"文学",{"category":17,"tags":397},[383,398,399],"SCP","模因",{"category":17,"tags":401},[383,402,403],"画集","艺术",{"category":17,"tags":405},[14,406,383],"写作",{"category":17,"tags":408},[383,409,410],"音乐","摇滚",{"category":17,"tags":412},[383,392],{"category":17,"tags":414},[383,409],{"category":17,"tags":416},[383,35,392],{"category":17,"tags":418},[383,419,420],"同人","手书",{"category":17,"tags":422},[383,392],{"category":17,"tags":424},[383,392],{"category":17,"tags":426},[383,427],"植物",{"category":17,"tags":429},[383,430],"读书",{"category":17,"tags":432},[383,392],{"category":17,"tags":434},[383,392],{"category":17,"tags":436},[383,392],{"category":17,"tags":438},[383,392],{"category":17,"tags":440},[383,392],{"category":17,"tags":442},[383,392],{"category":17,"tags":444},[14,445,383],"一周年",{"category":17,"tags":447},[383,392],{"category":17,"tags":449},[383,392],{"category":17,"tags":451},[35,452,453],"开源组织","SITE-193",{"category":17,"tags":455},[383,392],{"category":17,"tags":457},[383,458],"年末",{"category":17,"tags":460},[383,392],{"category":17,"tags":462},[383,392],{"category":17,"tags":464},[14,17],{"category":17,"tags":466},[383,392],{"category":17,"tags":468},[383,392],{"category":17,"tags":470},[383,392],{"category":17,"tags":472},[383,392],{"category":17,"tags":474},[383,475,476],"游戏","Control",{"category":30,"tags":478},[479,480,481,482],"Quadim","图像处理","四叉树","Rust",{"category":17,"tags":484},[14,485],"上线纪念",{"category":17,"tags":487},[383,395],{"category":30,"tags":489},[203,490],"测试",{"category":17,"tags":492},[383],{"category":17,"tags":494},[383,392],{"category":17,"tags":496},[383],{"category":5,"tags":498},[40],{"category":5,"tags":500},[40],{"category":5,"tags":502},[40],{"category":5,"tags":504},[40],{"category":5,"tags":506},[40],[508,512,516,520,524,528,532,536,540,544,548,552,556,560,564,568,572,576,579,583,587,590,594,598,602,606,610,614,618,622,626,630,634,638,642,646,650,654,658,662,666,670,674,678,682,686,690,694,698,702,706,710,714,718,722,726,730,734,738,742,746,750,754,758,762,766,770,774,778,782,786,790,794,798,801,805,809,813,817,821,825,829,833,837,841,845,849,853,857,861,865,869,873,877,881,885,889,893,897,901,904,907,911,915,919,923,927,930,934,938,942,946,950,954,957,961,965,969,973,977,981,984,988,992,996,1000,1004,1007,1011,1015,1019,1023,1027,1031,1035,1039,1043,1047,1051,1055,1059,1063,1067,1071,1075,1079],{"path":509,"words":510,"published":511,"date":156},"\u002Fposts\u002F2024\u002F2024-06-25-liteloaderqqnt",1296,"2024-06-25 11:03:08",{"path":513,"words":514,"published":515,"date":156},"\u002Fposts\u002F2024\u002F2024-06-26-ip签名",0,"2024-06-26 22:53:53",{"path":517,"words":518,"published":519,"date":156},"\u002Fposts\u002F2024\u002F2024-06-29-何加盐中文互联网正在加速崩塌",4853,"2024-06-29 00:47:13",{"path":521,"words":522,"published":523,"date":156},"\u002Fposts\u002F2024\u002F2024-07-12-github-chart",270,"2024-07-12 20:02:50",{"path":525,"words":526,"published":527,"date":156},"\u002Fposts\u002F2024\u002F2024-07-14-访客数统计",192,"2024-07-24 01:34:28",{"path":529,"words":530,"published":531,"date":156},"\u002Fposts\u002F2024\u002F2024-07-26-广大选课脚本",110,"2024-07-26 01:34:28",{"path":533,"words":534,"published":535,"date":156},"\u002Fposts\u002F2024\u002F2024-07-26-数学分析笔记其二",14,"2024-07-26 23:54:02",{"path":537,"words":538,"published":539,"date":156},"\u002Fposts\u002F2024\u002F2024-07-26-数据结构复习其二",12856,"2024-07-26 02:48:08",{"path":541,"words":542,"published":543,"date":156},"\u002Fposts\u002F2024\u002F2024-07-26-数据结构复习相关",32856,"2024-07-26 02:24:14",{"path":545,"words":546,"published":547,"date":156},"\u002Fposts\u002F2024\u002F2024-07-26-线性代数与空间解析几何知识点全汇总",6110,"2024-07-26 03:27:55",{"path":549,"words":550,"published":551,"date":156},"\u002Fposts\u002F2024\u002F2024-07-31-typora-picgo-兰空图床打造markdown写作环境",311,"2024-07-31 12:56:23",{"path":553,"words":554,"published":555,"date":156},"\u002Fposts\u002F2024\u002F2024-09-02-jupyter配置中文",441,"2024-09-02 23:49:05",{"path":557,"words":558,"published":559,"date":156},"\u002Fposts\u002F2024\u002F2024-09-02-自定义vscode背景图片",100,"2024-09-02 23:39:00",{"path":561,"words":562,"published":563,"date":156},"\u002Fposts\u002F2024\u002F2024-09-03-制作gzhu校园网路由器",1423,"2024-09-03 23:43:18",{"path":565,"words":566,"published":567,"date":156},"\u002Fposts\u002F2024\u002F2024-09-26-09-25-2024",136,"2024-09-26 00:49:26",{"path":569,"words":570,"published":571,"date":156},"\u002Fposts\u002F2024\u002F2024-11-04-创建一个网络包解码器分析devp2p协议",1943,"2024-11-04 16:45:19",{"path":573,"words":574,"published":575,"date":156},"\u002Fposts\u002F2024\u002F2025-03-09-2024一些笔记常微分",16,"2024-12-09 22:51:00",{"path":577,"words":574,"published":578,"date":156},"\u002Fposts\u002F2024\u002F2025-03-09-2024一些笔记概率论","2025-03-09 22:51:00",{"path":580,"words":581,"published":582,"date":156},"\u002Fposts\u002F2025\u002F2025-03-01-windows下释放docker占用的wsl空间",164,"2025-03-01 13:54:15",{"path":584,"words":585,"published":586,"date":156},"\u002Fposts\u002F2025\u002F2025-03-01-爬虫实战-爬取广州大学课程表",774,"2025-03-01 14:55:48",{"path":588,"words":530,"published":589,"date":156},"\u002Fposts\u002F2025\u002F2025-04-03-hexo集成gitalk的问题","2025-04-03 14:26:34",{"path":591,"words":592,"published":593,"date":156},"\u002Fposts\u002F2025\u002F2025-09-22-记一次配置obsidian配合hexo写博客",92,"2025-09-22 16:47:52",{"path":595,"words":596,"published":597,"date":156},"\u002Fposts\u002F2025\u002F2025-10-24-10-20课题",204,"2025-10-24 08:15:01",{"path":599,"words":600,"published":601,"date":156},"\u002Fposts\u002F2025\u002F2025-11-02-组会朝花夕拾",501,"2025-11-02 18:56:59",{"path":603,"words":604,"published":605,"date":156},"\u002Fposts\u002F2025\u002F2025-11-05-基于随机加权推断模型im的参数估计算法",481,"2025-11-05 20:51:41",{"path":607,"words":608,"published":609,"date":156},"\u002Fposts\u002F2025\u002F2025-11-09-关于软考高项网规",884,"2025-11-09 19:54:52",{"path":611,"words":612,"published":613,"date":156},"\u002Fposts\u002F2025\u002F2025-11-17-arch-linux运行appimage相关",365,"2025-11-17 09:59:59",{"path":615,"words":616,"published":617,"date":156},"\u002Fposts\u002F2025\u002F2025-11-19-相关概念",2058,"2025-11-19 11:06:20",{"path":619,"words":620,"published":621,"date":156},"\u002Fposts\u002F2025\u002F2025-11-21-web可视化实践canvas",6393,"2025-11-21 14:50:48",{"path":623,"words":624,"published":625,"date":156},"\u002Fposts\u002F2025\u002F2025-11-22-使用-github-actions-自动部署基于vite的项目到-github-pages",272,"2025-11-23 01:59:24",{"path":627,"words":628,"published":629,"date":156},"\u002Fposts\u002F2025\u002F2025-11-22-关于前端包管理器npmpnpmyarn和bun",4890,"2025-11-22 21:21:15",{"path":631,"words":632,"published":633,"date":156},"\u002Fposts\u002F2025\u002F2025-11-23-undo-redo-机制具体实现",7839,"2025-11-23 19:15:00",{"path":635,"words":636,"published":637,"date":156},"\u002Fposts\u002F2025\u002F2025-11-27-前端安全-关于xss与crsf",1866,"2025-11-28 02:05:25",{"path":639,"words":640,"published":641,"date":156},"\u002Fposts\u002F2025\u002F2025-12-05-现代协同-2d-画布编辑器pixijs-v8",4285,"2025-12-05 02:00:16",{"path":643,"words":644,"published":645,"date":156},"\u002Fposts\u002F2025\u002F2025-12-07-杂谈-课题组系统设计",3710,"2025-12-07 21:09:33",{"path":647,"words":648,"published":649,"date":156},"\u002Fposts\u002F2025\u002F2025-12-25-javascript中的数组方法与栈stack和队列queue的实现",474,"2025-11-29 16:58:15",{"path":651,"words":652,"published":653,"date":156},"\u002Fposts\u002F2025\u002F2025-12-25-关于javascript-实现哈希表",189,"2025-11-27 11:31:39",{"path":655,"words":656,"published":657,"date":156},"\u002Fposts\u002F2025\u002F2025-12-25-关于javascript的set方法",332,"2025-12-25 15:26:18",{"path":659,"words":660,"published":661,"date":156},"\u002Fposts\u002F2025\u002F2025-12-25-关于动态规划(背包问题为例)",1238,"2025-11-17 18:24:04",{"path":663,"words":664,"published":665,"date":156},"\u002Fposts\u002F2025\u002F2025-12-25-关于滑动窗口",712,"2025-11-20 15:04:40",{"path":667,"words":668,"published":669,"date":156},"\u002Fposts\u002F2025\u002F2025-12-25-关于链表(javascript)",500,"2025-11-25 13:00:48",{"path":671,"words":672,"published":673,"date":156},"\u002Fposts\u002F2025\u002F2025-12-25-面试算法acm模式构建构建输入输出模板",2051,"2025-12-25 23:09:45",{"path":675,"words":676,"published":677,"date":156},"\u002Fposts\u002F2025\u002F2025-12-26-javascript-数字数组字符串的处理",483,"2025-12-26 11:20:25",{"path":679,"words":680,"published":681,"date":156},"\u002Fposts\u002F2025\u002F2025-12-26-javascripttypescript-的顺序表链表实现",446,"2025-12-26 12:16:12",{"path":683,"words":684,"published":685,"date":156},"\u002Fposts\u002F2025\u002F2025-12-27-前端画布设计vol-1-实现基础yuan素渲染和状态控制",2136,"2025-12-28 01:23:08",{"path":687,"words":688,"published":689,"date":156},"\u002Fposts\u002F2025\u002F2025-12-27-前端画布设计vol-2-实现富文本编辑",1838,"2025-12-28 02:58:47",{"path":691,"words":692,"published":693,"date":156},"\u002Fposts\u002F2025\u002F2025-12-27-算法刷题-关于链表操作",2135,"2025-12-27 16:12:42",{"path":695,"words":696,"published":697,"date":156},"\u002Fposts\u002F2025\u002F2025-12-27-配置dnscrypt-proxy实现加密dns服务windows",1899,"2025-11-15 01:06:37",{"path":699,"words":700,"published":701,"date":156},"\u002Fposts\u002F2025\u002F2025-12-28-前端-关于网络请求xhrajaxfetchaxios",7788,"2025-10-28 15:48:46",{"path":703,"words":704,"published":705,"date":156},"\u002Fposts\u002F2025\u002F2025-12-28-前端-接口封装与请求规范axios为例",2373,"2025-12-29 01:01:18",{"path":707,"words":708,"published":709,"date":156},"\u002Fposts\u002F2025\u002F2025-12-28-前端-身份验证管理-基于-jwt-token-的实现",2709,"2025-11-23 22:04:41",{"path":711,"words":712,"published":713,"date":156},"\u002Fposts\u002F2025\u002F2025-12-29-记canvas画布项目开发",6254,"2025-12-29 04:52:15",{"path":715,"words":716,"published":717,"date":156},"\u002Fposts\u002F2025\u002Fabout-site",116,"2025-03-31 16:44:24",{"path":719,"words":720,"published":721,"date":156},"\u002Fposts\u002F2025\u002F使用neo4j图数据科学库gds进行中心度分析",143,"2025-04-02 23:37:24",{"path":723,"words":724,"published":725,"date":156},"\u002Fposts\u002F2026\u002F2026-01-03-论文实训草稿",10445,"2026-01-03 14:10:49",{"path":727,"words":728,"published":729,"date":156},"\u002Fposts\u002F2026\u002F2026-01-06-人工智能导论",11461,"2026-01-07 03:25:49",{"path":731,"words":732,"published":733,"date":156},"\u002Fposts\u002F2026\u002F2026-01-07-机器学习相关算法",82,"2026-01-08 02:28:13",{"path":735,"words":736,"published":737,"date":156},"\u002Fposts\u002F2026\u002F2026-01-16-关于低复杂度最长链共识算法设计",4466,"2026-01-16 10:33:23",{"path":739,"words":740,"published":741,"date":156},"\u002Fposts\u002F2026\u002F2026-01-19-杂记2026-01-19",5754,"2026-01-20 01:03:26",{"path":743,"words":744,"published":745,"date":156},"\u002Fposts\u002F2026\u002F2026-01-22-github-action-自动同步博客到-github-主页",1069,"2026-01-22 16:31:47",{"path":747,"words":748,"published":749,"date":156},"\u002Fposts\u002F2026\u002F2026-03-01-windows-wsl安装docker",257,"2026-03-01 20:55:31",{"path":751,"words":752,"published":753,"date":156},"\u002Fposts\u002F2026\u002F2026-03-14-关于-msys2",701,"2026-03-15 03:05:04",{"path":755,"words":756,"published":757,"date":156},"\u002Fposts\u002F2026\u002F2026-03-28-团队项目协作规范随记",2419,"2026-03-29 05:33:50",{"path":759,"words":760,"published":761,"date":156},"\u002Fposts\u002F2026\u002F2026-03-29-oh-my-posh配置分享",104,"2026-03-29 16:34:43",{"path":763,"words":764,"published":765,"date":156},"\u002Fposts\u002F2026\u002F2026-06-13-从上下文工程到-agent-harness-engineering",8840,"2026-06-13 21:06:20",{"path":767,"words":768,"published":769,"date":156},"\u002Fposts\u002F2026\u002F2026-07-13-简谈前端基建质量标准与ai友好建设",3814,"2026-07-13 21:06:20",{"path":771,"words":772,"published":773,"date":156},"\u002Fposts\u002F2026\u002F2026-07-15-agentic-rag-系统实践",13357,"2026-07-15 21:06:20",{"path":775,"words":776,"published":777,"date":156},"\u002Fposts\u002F2026\u002F2026-07-18-简谈sdd规范驱动开发-copy",4476,"2026-07-18 11:06:20",{"path":779,"words":780,"published":781,"date":156},"\u002Fposts\u002F2026\u002F2026-07-20-个人neovim配置分享",366,"2026-07-22 13:46:50",{"path":783,"words":784,"published":785,"date":156},"\u002Fposts\u002F2026\u002F2026-07-20-关于技术写作-设计文档",6763,"2026-07-20 13:46:50",{"path":787,"words":788,"published":789,"date":156},"\u002Fposts\u002F2026\u002F2026-07-29-fastapi-工程实践随记",3417,"2026-07-29 04:58:34",{"path":791,"words":792,"published":793,"date":156},"\u002Fposts\u002Frfc_agentic_project\u002F2026-06-19-rfc-liskin_code_agent",3563,"2026-06-19 15:18:20",{"path":795,"words":796,"published":797,"date":156},"\u002Fposts\u002Frfc_agentic_project\u002F2026-07-25-rfc-glushkov_ogas",13461,"2026-07-28 23:46:50",{"path":799,"words":800,"published":793,"date":156},"\u002Fposts\u002Frfc_agentic_project\u002F2026-08-03-adr-ogas-arkhiv",2698,{"path":802,"words":803,"published":804,"date":156},"\u002Fposts\u002Frfc_agentic_project\u002Frag\u002F2026-08-12-arkhiv_rag-vol-1",4366,"2026-08-12 15:18:20",{"path":806,"words":807,"published":808,"date":156},"\u002Fposts\u002Fleetcode\u002F2025-12-25-力扣百题速练javascripttypescriptvol-1",3108,"2025-12-25 13:57:08",{"path":810,"words":811,"published":812,"date":156},"\u002Fposts\u002Fleetcode\u002F2025-12-26-力扣百题速练javascripttypescriptvol-2",3185,"2025-12-26 13:57:08",{"path":814,"words":815,"published":816,"date":156},"\u002Fposts\u002Fleetcode\u002F2025-12-28-力扣百题速练javascripttypescriptvol-3",2533,"2025-12-29 02:15:44",{"path":818,"words":819,"published":820,"date":156},"\u002Fposts\u002Fleetcode\u002F2026-01-17-力扣百题速练javascripttypescriptvol-4",3024,"2026-01-17 22:53:01",{"path":822,"words":823,"published":824,"date":156},"\u002Fposts\u002Fleetcode\u002F2026-01-19-力扣百题速练javascripttypescriptvol-5",293,"2026-01-19 15:15:12",{"path":826,"words":827,"published":828,"date":156},"\u002Fposts\u002F分布式处理与计算\u002F分布式处理与计算spark系统与scala语言",4320,"2026-07-06 14:10:49",{"path":830,"words":831,"published":832,"date":156},"\u002Fposts\u002F分布式处理与计算\u002F分布式处理与计算分类与回归分析",2081,"2026-07-07 12:40:29",{"path":834,"words":835,"published":836,"date":156},"\u002Fposts\u002F分布式处理与计算\u002F分布式处理与计算数值优化方法",2182,"2026-07-07 13:50:29",{"path":838,"words":839,"published":840,"date":156},"\u002Fposts\u002F分布式处理与计算\u002F分布式处理与计算数据降维",1583,"2026-07-07 21:50:29",{"path":842,"words":843,"published":844,"date":156},"\u002Fposts\u002F分布式处理与计算\u002F分布式处理与计算聚类分析",1882,"2026-07-07 16:50:29",{"path":846,"words":847,"published":848,"date":156},"\u002Fposts\u002F分布式处理与计算\u002F分布式处理与计算随机模拟与统计推断",2433,"2026-07-06 22:40:29",{"path":850,"words":851,"published":852,"date":156},"\u002Fposts\u002F数据可视化\u002F2026-06-14-数据可视化-基本图像",10011,"2026-06-14 20:18:20",{"path":854,"words":855,"published":856,"date":156},"\u002Fposts\u002F数据可视化\u002F2026-06-14-数据可视化-概论",10030,"2026-06-14 15:18:20",{"path":858,"words":859,"published":860,"date":156},"\u002Fposts\u002F数据可视化\u002F2026-06-15-数据可视化-可视化库",2032,"2026-06-15 20:18:20",{"path":862,"words":863,"published":864,"date":156},"\u002Fposts\u002F数据结构\u002F2025-09-29-数据结构-图",5451,"2025-04-15 20:48:06",{"path":866,"words":867,"published":868,"date":156},"\u002Fposts\u002F数据结构\u002F2025-09-29-数据结构-树",4211,"2025-04-30 02:19:06",{"path":870,"words":871,"published":872,"date":156},"\u002Fposts\u002F数据结构\u002F2025-09-29-数据结构-队列",921,"2025-04-11 15:30:08",{"path":874,"words":875,"published":876,"date":156},"\u002Fposts\u002F数据结构\u002F关于数据结构的一些想法",456,"2025-04-04 19:13:49",{"path":878,"words":879,"published":880,"date":156},"\u002Fposts\u002F数据结构\u002F数据结构-栈",920,"2025-04-18 00:17:37",{"path":882,"words":883,"published":884,"date":156},"\u002Fposts\u002F数据结构\u002F数据结构-算法复杂度",2153,"2025-04-05 16:09:55",{"path":886,"words":887,"published":888,"date":156},"\u002Fposts\u002F数据结构\u002F数据结构-线性表链表",4572,"2025-04-06 00:24:40",{"path":890,"words":891,"published":892,"date":156},"\u002Fposts\u002F数据结构\u002F数据结构-线性表顺序表",4191,"2025-04-05 22:09:59",{"path":894,"words":895,"published":896,"date":156},"\u002Fposts\u002F数据结构\u002F数据结构-绪论",2881,"2025-04-05 11:31:22",{"path":898,"words":899,"published":156,"date":900},"\u002Fposts\u002F杂记\u002F2023-12-26-2023年12月26日",7,"2023-12-26 23:51:33",{"path":902,"words":899,"published":156,"date":903},"\u002Fposts\u002F杂记\u002F2024-01-01-2024团建","2024-01-01 01:51:27",{"path":905,"words":581,"published":156,"date":906},"\u002Fposts\u002F杂记\u002F2024-01-09-随记","2024-01-09 20:50:35",{"path":908,"words":909,"published":156,"date":910},"\u002Fposts\u002F杂记\u002F2024-03-12-花名",5275,"2024-03-12 16:04:23",{"path":912,"words":913,"published":156,"date":914},"\u002Fposts\u002F杂记\u002F2024-04-15-逆模因",1353,"2024-04-15 00:26:16",{"path":916,"words":917,"published":156,"date":918},"\u002Fposts\u002F杂记\u002F2024-05-03-艺作",27,"2024-05-03 00:01:00",{"path":920,"words":921,"published":156,"date":922},"\u002Fposts\u002F杂记\u002F2024-05-21-关于博客",1720,"2024-02-21 23:21:11",{"path":924,"words":925,"published":156,"date":926},"\u002Fposts\u002F杂记\u002F2024-06-20-dnvrc维克多崔专访-2023",2036,"2024-06-20 00:28:39",{"path":928,"words":760,"published":156,"date":929},"\u002Fposts\u002F杂记\u002F2024-06-25-6月25日随记","2024-06-25 12:46:36",{"path":931,"words":932,"published":156,"date":933},"\u002Fposts\u002F杂记\u002F2024-06-25-歌名-想見星星",148,"2024-06-25 22:47:59",{"path":935,"words":936,"published":156,"date":937},"\u002Fposts\u002F杂记\u002F2024-07-11-桂花岗",6,"2024-07-11 00:28:17",{"path":939,"words":940,"published":156,"date":941},"\u002Fposts\u002F杂记\u002F2024-07-15-rolling-bocci",9,"2024-07-15 21:25:56",{"path":943,"words":944,"published":156,"date":945},"\u002Fposts\u002F杂记\u002F2024-07-22-七月九日",34,"2024-07-09 17:54:23",{"path":947,"words":948,"published":156,"date":949},"\u002Fposts\u002F杂记\u002F2024-07-22-六月随记",1052,"2024-07-22 01:03:19",{"path":951,"words":952,"published":156,"date":953},"\u002Fposts\u002F杂记\u002F2024-07-22-石菖蒲",41,"2024-07-10 01:26:05",{"path":955,"words":514,"published":156,"date":956},"\u002Fposts\u002F杂记\u002F2024-07-23-新书","2024-07-23 01:05:49",{"path":958,"words":959,"published":156,"date":960},"\u002Fposts\u002F杂记\u002F2024-07-29-年前",74,"2024-07-29 23:59:07",{"path":962,"words":963,"published":156,"date":964},"\u002Fposts\u002F杂记\u002F2024-07-30-周边",138,"2024-07-30 02:03:23",{"path":966,"words":967,"published":156,"date":968},"\u002Fposts\u002F杂记\u002F2024-07-31-2024-7-31日",185,"2024-07-31 01:21:52",{"path":970,"words":971,"published":156,"date":972},"\u002Fposts\u002F杂记\u002F2024-08-02-八月",1710,"2024-08-30 00:31:02",{"path":974,"words":975,"published":156,"date":976},"\u002Fposts\u002F杂记\u002F2024-09-01-九月",1484,"2024-09-26 16:30:15",{"path":978,"words":979,"published":156,"date":980},"\u002Fposts\u002F杂记\u002F2024-09-08-2024年9月8日",97,"2024-09-08 13:59:36",{"path":982,"words":514,"published":156,"date":983},"\u002Fposts\u002F杂记\u002F2024-09-19-博客站的一周年","2024-09-18 23:36:24",{"path":985,"words":986,"published":156,"date":987},"\u002Fposts\u002F杂记\u002F2024-10-03-十月",1028,"2024-10-31 23:54:27",{"path":989,"words":990,"published":156,"date":991},"\u002Fposts\u002F杂记\u002F2024-11-04-十一月",2134,"2024-11-30 00:04:39",{"path":993,"words":994,"published":156,"date":995},"\u002Fposts\u002F杂记\u002F2024-11-10-gzhu-site-193",80,"2024-11-10 19:19:12",{"path":997,"words":998,"published":156,"date":999},"\u002Fposts\u002F杂记\u002F2024-12-01-十二月",455,"2024-12-30 23:13:47",{"path":1001,"words":1002,"published":156,"date":1003},"\u002Fposts\u002F杂记\u002F2024-12-21-年末",23,"2024-12-21 23:21:49",{"path":1005,"words":522,"published":156,"date":1006},"\u002Fposts\u002F杂记\u002F2025-01-30-一月","2025-01-30 23:44:41",{"path":1008,"words":1009,"published":156,"date":1010},"\u002Fposts\u002F杂记\u002F2025-03-01-二月",224,"2025-02-28 00:11:08",{"path":1012,"words":1013,"published":156,"date":1014},"\u002Fposts\u002F杂记\u002F2025-03-01-博客杂谈",344,"2025-03-01 16:03:18",{"path":1016,"words":1017,"published":156,"date":1018},"\u002Fposts\u002F杂记\u002F2025-03-05-三月",2090,"2025-03-05 19:17:28",{"path":1020,"words":1021,"published":156,"date":1022},"\u002Fposts\u002F杂记\u002F2025-07-10-七月",361,"2025-07-10 22:04:32",{"path":1024,"words":1025,"published":156,"date":1026},"\u002Fposts\u002F杂记\u002F2025-09-21-九月",781,"2025-09-21 20:53:37",{"path":1028,"words":1029,"published":156,"date":1030},"\u002Fposts\u002F杂记\u002F2025-10-09-十月",591,"2025-10-09 00:35:07",{"path":1032,"words":1033,"published":156,"date":1034},"\u002Fposts\u002F杂记\u002Fcontrol",13,"2023-09-25 13:03:59",{"path":1036,"words":1037,"published":156,"date":1038},"\u002Fposts\u002F杂记\u002Fquadim四叉树图像处理",1094,"2023-10-21 11:27:06",{"path":1040,"words":1041,"published":156,"date":1042},"\u002Fposts\u002F杂记\u002Fsuccess",24,"2023-09-22 15:59:07",{"path":1044,"words":1045,"published":156,"date":1046},"\u002Fposts\u002F杂记\u002F三光年",295,"2023-11-18 04:18:40",{"path":1048,"words":1049,"published":156,"date":1050},"\u002Fposts\u002F杂记\u002F加密测试",961,"2023-11-21 14:24:01",{"path":1052,"words":1053,"published":156,"date":1054},"\u002Fposts\u002F杂记\u002F啊啊啊啊啊啊啊",54,"2023-09-20 17:29:33",{"path":1056,"words":1057,"published":156,"date":1058},"\u002Fposts\u002F杂记\u002F杂谈",124,"2023-09-25 23:11:32",{"path":1060,"words":1061,"published":156,"date":1062},"\u002Fposts\u002F杂记\u002F艹",25,"2023-10-21 17:40:43",{"path":1064,"words":1065,"published":1066,"date":156},"\u002Fposts\u002F神经网络\u002F神经网络与深度学习卷积神经网络",3168,"2026-06-07 11:23:08",{"path":1068,"words":1069,"published":1070,"date":156},"\u002Fposts\u002F神经网络\u002F神经网络与深度学习循环神经网络",2348,"2026-06-07 11:33:08",{"path":1072,"words":1073,"published":1074,"date":156},"\u002Fposts\u002F神经网络\u002F神经网络与深度学习改进学习方法",3360,"2026-06-07 10:13:08",{"path":1076,"words":1077,"published":1078,"date":156},"\u002Fposts\u002F神经网络\u002F神经网络与深度学习深度生成模型",2727,"2026-06-07 11:43:08",{"path":1080,"words":1081,"published":1082,"date":156},"\u002Fposts\u002F神经网络\u002F神经网络与深度学习神经网络基础",3205,"2026-06-07 10:03:08",{"id":1084,"title":1085,"abbrlink":1086,"body":1087,"category":40,"cover":156,"date":156,"description":1118,"extension":1318,"mathjax":1319,"meta":1320,"navigation":1319,"path":667,"published":669,"readingMinutes":1301,"seo":1323,"stem":1324,"sticky":156,"swiper_index":156,"tags":1325,"updated":156,"words":668,"__hash__":1326},"posts\u002Fposts\u002F2025\u002F2025-12-25-关于链表(Javascript).md","2025-11-25 关于链表(Javascript)","33314",{"type":1088,"value":1089,"toc":1297},"minimark",[1090,1095,1099,1103,1108,1111,1122,1126,1129,1135,1138,1145,1151,1155,1160,1166,1170,1175,1181,1185,1190,1196,1200,1205,1211,1214,1216,1220,1242,1245,1250,1264,1267,1274,1280,1283,1288,1294],[1091,1092,1094],"h2",{"id":1093},"关于链表javascript","关于链表(Javascript)",[1096,1097,1098],"p",{},"链表是一种常见的数据结构，由一系列节点组成，每个节点包含数据和指向下一个节点的引用，在 JavaScript 中广泛应用于算法问题和实际开发",[1100,1101,1102],"h4",{"id":1102},"链表的基本操作",[1104,1105,1107],"h5",{"id":1106},"_1-单向链表的实现","1. 单向链表的实现",[1096,1109,1110],{},"下面是一个简单的单向链表的实现，包括节点定义和基本操作：",[1112,1113,1119],"pre",{"className":1114,"code":1116,"language":1117,"meta":1118},[1115],"language-javascript","\u002F\u002F 定义节点类\nclass ListNode {\n  constructor(value) {\n    this.value = value \u002F\u002F 节点的值\n    this.next = null \u002F\u002F 指向下一个节点的指针，初始为 null\n  }\n}\n\n\u002F\u002F 定义单向链表类\nclass LinkedList {\n  constructor() {\n    this.head = null \u002F\u002F 链表头节点，初始为 null\n  }\n\n  \u002F\u002F 在链表末尾添加节点\n  append(value) {\n    const newNode = new ListNode(value) \u002F\u002F 创建一个新的节点\n    if (this.head === null) {\n      \u002F\u002F 如果链表为空，新的节点作为头节点\n      this.head = newNode\n    } else {\n      let current = this.head\n      while (current.next !== null) {\n        \u002F\u002F 遍历链表找到最后一个节点\n        current = current.next\n      }\n      current.next = newNode \u002F\u002F 将新的节点添加到最后一个节点的 next\n    }\n  }\n\n  \u002F\u002F 在链表头部添加节点\n  prepend(value) {\n    const newNode = new ListNode(value) \u002F\u002F 创建一个新的节点\n    newNode.next = this.head \u002F\u002F 新节点的 next 指向当前的头节点\n    this.head = newNode \u002F\u002F 新节点作为头节点\n  }\n\n  \u002F\u002F 删除指定值的节点\n  delete(value) {\n    if (this.head === null) return \u002F\u002F 如果链表为空，直接返回\n\n    \u002F\u002F 如果头节点就是要删除的节点\n    if (this.head.value === value) {\n      this.head = this.head.next\n      return\n    }\n\n    let current = this.head\n    while (current.next !== null) {\n      if (current.next.value === value) {\n        \u002F\u002F 找到要删除的节点\n        current.next = current.next.next \u002F\u002F 将要删除的节点移出链表\n        return\n      }\n      current = current.next\n    }\n  }\n\n  \u002F\u002F 打印链表\n  print() {\n    let current = this.head\n    while (current !== null) {\n      process.stdout.write(`${current.value} -> `) \u002F\u002F 输出当前节点的值\n      current = current.next\n    }\n    console.log('null') \u002F\u002F 表示链表结束\n  }\n}\n\n\u002F\u002F 示例：使用单向链表\nconst list = new LinkedList()\nlist.append(1)\nlist.append(2)\nlist.append(3)\nlist.prepend(0)\nlist.print() \u002F\u002F 输出 0 -> 1 -> 2 -> 3 -> null\nlist.delete(2)\nlist.print() \u002F\u002F 输出 0 -> 1 -> 3 -> null\n","javascript","",[1120,1121,1116],"code",{"__ignoreMap":1118},[1104,1123,1125],{"id":1124},"_2-双向链表的实现","2. 双向链表的实现",[1096,1127,1128],{},"下面是一个简单的双向链表的实现，包括节点定义和基本操作：",[1112,1130,1133],{"className":1131,"code":1132,"language":1117,"meta":1118},[1115],"\u002F\u002F 定义双向节点类\nclass DoublyListNode {\n  constructor(value) {\n    this.value = value \u002F\u002F 节点的值\n    this.next = null \u002F\u002F 指向下一个节点的指针，初始为 null\n    this.prev = null \u002F\u002F 指向前一个节点的指针，初始为 null\n  }\n}\n\n\u002F\u002F 定义双向链表类\nclass DoublyLinkedList {\n  constructor() {\n    this.head = null \u002F\u002F 链表头节点，初始为 null\n    this.tail = null \u002F\u002F 链表尾节点，初始为 null\n  }\n\n  \u002F\u002F 在链表末尾添加节点\n  append(value) {\n    const newNode = new DoublyListNode(value) \u002F\u002F 创建一个新的节点\n    if (this.tail === null) {\n      \u002F\u002F 如果链表为空，新的节点作为头和尾节点\n      this.head = newNode\n      this.tail = newNode\n    } else {\n      this.tail.next = newNode \u002F\u002F 将新的节点添加到尾节点的 next\n      newNode.prev = this.tail \u002F\u002F 新节点的 prev 指向当前的尾节点\n      this.tail = newNode \u002F\u002F 新节点作为新的尾节点\n    }\n  }\n\n  \u002F\u002F 在链表头部添加节点\n  prepend(value) {\n    const newNode = new DoublyListNode(value) \u002F\u002F 创建一个新的节点\n    if (this.head === null) {\n      \u002F\u002F 如果链表为空，新的节点作为头和尾节点\n      this.head = newNode\n      this.tail = newNode\n    } else {\n      this.head.prev = newNode \u002F\u002F 头节点的 prev 指向新的节点\n      newNode.next = this.head \u002F\u002F 新节点的 next 指向当前的头节点\n      this.head = newNode \u002F\u002F 新节点作为新的头节点\n    }\n  }\n\n  \u002F\u002F 删除指定值的节点\n  delete(value) {\n    if (this.head === null) return \u002F\u002F 如果链表为空，直接返回\n\n    \u002F\u002F 如果头节点就是要删除的节点\n    if (this.head.value === value) {\n      this.head = this.head.next\n      if (this.head !== null) {\n        this.head.prev = null\n      } else {\n        this.tail = null \u002F\u002F 如果链表为空，更新尾节点\n      }\n      return\n    }\n\n    let current = this.head\n    while (current !== null) {\n      if (current.value === value) {\n        \u002F\u002F 找到要删除的节点\n        if (current.next !== null) {\n          current.next.prev = current.prev\n        } else {\n          this.tail = current.prev \u002F\u002F 更新尾节点\n        }\n        current.prev.next = current.next\n        return\n      }\n      current = current.next\n    }\n  }\n\n  \u002F\u002F 打印链表\n  print() {\n    let current = this.head\n    while (current !== null) {\n      process.stdout.write(`${current.value} \u003C-> `) \u002F\u002F 输出当前节点的值\n      current = current.next\n    }\n    console.log('null') \u002F\u002F 表示链表结束\n  }\n}\n\n\u002F\u002F 示例：使用双向链表\nconst dList = new DoublyLinkedList()\ndList.append(1)\ndList.append(2)\ndList.append(3)\ndList.prepend(0)\ndList.print() \u002F\u002F 输出 0 \u003C-> 1 \u003C-> 2 \u003C-> 3 \u003C-> null\ndList.delete(2)\ndList.print() \u002F\u002F 输出 0 \u003C-> 1 \u003C-> 3 \u003C-> null\n",[1120,1134,1132],{"__ignoreMap":1118},[1104,1136,1137],{"id":1137},"查找某个元素",[1096,1139,1140,1144],{},[1141,1142,1143],"strong",{},"问题描述","：在链表中查找指定值的节点，并返回其位置索引。",[1112,1146,1149],{"className":1147,"code":1148,"language":1117,"meta":1118},[1115],"\u002F**\n * 查找指定值的节点\n * @param {LinkedList} list - 单向链表\n * @param {any} value - 要查找的值\n * @returns {number} - 节点的位置索引，如果未找到返回-1\n *\u002F\nfunction findElement(list, value) {\n  let current = list.head\n  let index = 0\n\n  while (current !== null) {\n    if (current.value === value) {\n      return index \u002F\u002F 找到值，返回索引\n    }\n    current = current.next\n    index++\n  }\n\n  return -1 \u002F\u002F 未找到，返回-1\n}\n\n\u002F\u002F 示例：查找元素\nconst searchList = new LinkedList()\nsearchList.append(1)\nsearchList.append(2)\nsearchList.append(3)\nsearchList.append(4)\n\nconsole.log(findElement(searchList, 3)) \u002F\u002F 输出 2\nconsole.log(findElement(searchList, 5)) \u002F\u002F 输出 -1\n",[1120,1150,1148],{"__ignoreMap":1118},[1104,1152,1154],{"id":1153},"_2-在指定位置插入元素","2. 在指定位置插入元素",[1096,1156,1157,1159],{},[1141,1158,1143],{},"：在链表的指定位置插入新节点。",[1112,1161,1164],{"className":1162,"code":1163,"language":1117,"meta":1118},[1115],"\u002F**\n * 在指定位置插入节点\n * @param {LinkedList} list - 单向链表\n * @param {number} position - 插入位置（从0开始）\n * @param {any} value - 要插入的值\n * @returns {boolean} - 插入成功返回true，否则返回false\n *\u002F\nfunction insertAtPosition(list, position, value) {\n  if (position \u003C 0) {\n    return false \u002F\u002F 位置无效\n  }\n\n  if (position === 0) {\n    \u002F\u002F 在头部插入\n    const newNode = new ListNode(value)\n    newNode.next = list.head\n    list.head = newNode\n    return true\n  }\n\n  let current = list.head\n  let index = 0\n\n  \u002F\u002F 找到指定位置的前一个节点\n  while (current !== null && index \u003C position - 1) {\n    current = current.next\n    index++\n  }\n\n  \u002F\u002F 如果位置超出链表长度\n  if (index !== position - 1 && current === null) {\n    return false\n  }\n\n  \u002F\u002F 插入新节点\n  const newNode = new ListNode(value)\n  newNode.next = current.next\n  current.next = newNode\n  return true\n}\n\n\u002F\u002F 示例：在指定位置插入元素\nconst insertList = new LinkedList()\ninsertList.append(1)\ninsertList.append(2)\ninsertList.append(4)\n\ninsertList.print() \u002F\u002F 输出 1 -> 2 -> 4 -> null\ninsertAtPosition(insertList, 2, 3) \u002F\u002F 在索引2的位置插入3\ninsertList.print() \u002F\u002F 输出 1 -> 2 -> 3 -> 4 -> null\ninsertAtPosition(insertList, 0, 0) \u002F\u002F 在开头插入0\ninsertList.print() \u002F\u002F 输出 0 -> 1 -> 2 -> 3 -> 4 -> null\n",[1120,1165,1163],{"__ignoreMap":1118},[1104,1167,1169],{"id":1168},"_3-查找指定位置的元素","3. 查找指定位置的元素",[1096,1171,1172,1174],{},[1141,1173,1143],{},"：获取链表中指定位置的元素值。",[1112,1176,1179],{"className":1177,"code":1178,"language":1117,"meta":1118},[1115],"\u002F**\n * 获取指定位置的元素\n * @param {LinkedList} list - 单向链表\n * @param {number} position - 位置索引（从0开始）\n * @returns {any|undefined} - 位置上的值，如果位置无效返回undefined\n *\u002F\nfunction getElementAtPosition(list, position) {\n  if (position \u003C 0 || list.head === null) {\n    return undefined \u002F\u002F 位置无效或链表为空\n  }\n\n  let current = list.head\n  let index = 0\n\n  while (current !== null && index \u003C position) {\n    current = current.next\n    index++\n  }\n\n  if (index === position && current !== null) {\n    return current.value\n  }\n\n  return undefined \u002F\u002F 位置超出链表长度\n}\n\n\u002F\u002F 示例：获取指定位置的元素\nconst positionList = new LinkedList()\npositionList.append(10)\npositionList.append(20)\npositionList.append(30)\n\nconsole.log(getElementAtPosition(positionList, 0)) \u002F\u002F 输出 10\nconsole.log(getElementAtPosition(positionList, 2)) \u002F\u002F 输出 30\nconsole.log(getElementAtPosition(positionList, 5)) \u002F\u002F 输出 undefined\n",[1120,1180,1178],{"__ignoreMap":1118},[1104,1182,1184],{"id":1183},"_4-删除指定位置的元素","4. 删除指定位置的元素",[1096,1186,1187,1189],{},[1141,1188,1143],{},"：删除链表中指定位置的节点。",[1112,1191,1194],{"className":1192,"code":1193,"language":1117,"meta":1118},[1115],"\u002F**\n * 删除指定位置的节点\n * @param {LinkedList} list - 单向链表\n * @param {number} position - 要删除的位置（从0开始）\n * @returns {boolean} - 删除成功返回true，否则返回false\n *\u002F\nfunction deleteAtPosition(list, position) {\n  if (position \u003C 0 || list.head === null) {\n    return false \u002F\u002F 位置无效或链表为空\n  }\n\n  if (position === 0) {\n    \u002F\u002F 删除头节点\n    list.head = list.head.next\n    return true\n  }\n\n  let current = list.head\n  let index = 0\n\n  \u002F\u002F 找到指定位置的前一个节点\n  while (current !== null && index \u003C position - 1) {\n    current = current.next\n    index++\n  }\n\n  \u002F\u002F 如果位置超出链表长度\n  if (index !== position - 1 || current.next === null) {\n    return false\n  }\n\n  \u002F\u002F 删除节点\n  current.next = current.next.next\n  return true\n}\n\n\u002F\u002F 示例：删除指定位置的元素\nconst deleteList = new LinkedList()\ndeleteList.append(1)\ndeleteList.append(2)\ndeleteList.append(3)\ndeleteList.append(4)\n\ndeleteList.print() \u002F\u002F 输出 1 -> 2 -> 3 -> 4 -> null\ndeleteAtPosition(deleteList, 2) \u002F\u002F 删除索引2的位置（值为3）\ndeleteList.print() \u002F\u002F 输出 1 -> 2 -> 4 -> null\ndeleteAtPosition(deleteList, 0) \u002F\u002F 删除索引0的位置（值为1）\ndeleteList.print() \u002F\u002F 输出 2 -> 4 -> null\n",[1120,1195,1193],{"__ignoreMap":1118},[1104,1197,1199],{"id":1198},"_5-获取链表长度","5. 获取链表长度",[1096,1201,1202,1204],{},[1141,1203,1143],{},"：计算链表中节点的数量。",[1112,1206,1209],{"className":1207,"code":1208,"language":1117,"meta":1118},[1115],"\u002F**\n * 获取链表长度\n * @param {LinkedList} list - 单向链表\n * @returns {number} - 链表长度\n *\u002F\nfunction getListLength(list) {\n  let current = list.head\n  let length = 0\n\n  while (current !== null) {\n    length++\n    current = current.next\n  }\n\n  return length\n}\n\n\u002F\u002F 示例：获取链表长度\nconst lengthList = new LinkedList()\nlengthList.append(1)\nlengthList.append(2)\nlengthList.append(3)\n\nconsole.log(getListLength(lengthList)) \u002F\u002F 输出 3\nlengthList.append(4)\nconsole.log(getListLength(lengthList)) \u002F\u002F 输出 4\n",[1120,1210,1208],{"__ignoreMap":1118},[1212,1213],"hr",{},[1212,1215],{},[1217,1218,1219],"h3",{"id":1219},"其他操作",[1221,1222,1223,1227,1230,1233,1236,1239],"ul",{},[1224,1225,1226],"li",{},"查找元素：根据值查找节点位置",[1224,1228,1229],{},"指定位置插入：在特定位置插入新节点",[1224,1231,1232],{},"指定位置获取：获取特定位置的节点值",[1224,1234,1235],{},"指定位置删除：删除特定位置的节点",[1224,1237,1238],{},"递归反转：使用递归方式反转链表",[1224,1240,1241],{},"获取长度：统计链表中节点的数量",[1104,1243,1244],{"id":1244},"反转链表",[1096,1246,1247,1249],{},[1141,1248,1143],{},"：反转一个单向链表",[1221,1251,1252,1255,1258,1261],{},[1224,1253,1254],{},"初始化 prev 为 null（新链表的尾部）。",[1224,1256,1257],{},"current 从链表头节点开始。",[1224,1259,1260],{},"在循环中：",[1224,1262,1263],{},"循环结束后，prev 指向原链表的尾节点（新头节点），更新 list.head = prev。",[1096,1265,1266],{},"其实就是三指针原地反转",[1096,1268,1269],{},[1270,1271],"img",{"alt":1272,"src":1273},"alt text","https:\u002F\u002Fpic4.zhimg.com\u002Fv2-6a742659e12b185569b64a1f773bd993_b.webp",[1112,1275,1278],{"className":1276,"code":1277,"language":1117,"meta":1118},[1115],"\u002F**\n * 反转单向链表\n * @param {LinkedList} list - 单向链表\n * @returns {LinkedList} - 反转后的链表\n *\u002F\nfunction reverseLinkedList(list) {\n  let prev = null\n  let current = list.head\n  while (current !== null) {\n    let next = current.next \u002F\u002F 暂存下一个节点\n    current.next = prev \u002F\u002F 将当前节点的 next 指向前一个节点\n    prev = current \u002F\u002F 更新前一个节点为当前节点\n    current = next \u002F\u002F 继续遍历下一个节点\n  }\n  list.head = prev \u002F\u002F 更新头节点为最后一个非空节点\n  return list\n}\n\n\u002F\u002F 示例：反转链表\nconst rList = new LinkedList()\nrList.append(1)\nrList.append(2)\nrList.append(3)\nrList.print() \u002F\u002F 输出 1 -> 2 -> 3 -> null\nreverseLinkedList(rList)\nrList.print() \u002F\u002F 输出 3 -> 2 -> 1 -> null\n",[1120,1279,1277],{"__ignoreMap":1118},[1104,1281,1282],{"id":1282},"合并两个有序链表",[1096,1284,1285,1287],{},[1141,1286,1143],{},"：合并两个有序链表，使结果链表仍然有序。",[1112,1289,1292],{"className":1290,"code":1291,"language":1117,"meta":1118},[1115],"\u002F**\n * 合并两个有序链表\n * @param {LinkedList} l1 - 第一个有序链表\n * @param {LinkedList} l2 - 第二个有序链表\n * @returns {LinkedList} - 合并后的有序链表\n *\u002F\nfunction mergeTwoLists(l1, l2) {\n  let dummy = new ListNode(0) \u002F\u002F 创建一个哨兵节点\n  let current = dummy\n\n  let p1 = l1.head\n  let p2 = l2.head\n\n  \u002F\u002F 遍历两个链表\n  while (p1 !== null && p2 !== null) {\n    if (p1.value \u003C p2.value) {\n      current.next = p1 \u002F\u002F 将较小值的节点添加到结果链表中\n      p1 = p1.next\n    } else {\n      current.next = p2\n      p2 = p2.next\n    }\n    current = current.next\n  }\n\n  \u002F\u002F 将剩余的节点连接到结果链表中\n  if (p1 !== null) {\n    current.next = p1\n  }\n  if (p2 !== null) {\n    current.next = p2\n  }\n\n  let mergedList = new LinkedList()\n  mergedList.head = dummy.next \u002F\u002F 哨兵节点的 next 为合并后的头节点\n  return mergedList\n}\n\n\u002F\u002F 示例：合并两个有序链表\nconst list1 = new LinkedList()\nlist1.append(1)\nlist1.append(3)\nlist1.append(5)\nconst list2 = new LinkedList()\nlist2.append(2)\nlist2.append(4)\nlist2.append(6)\n\nconst mergedList = mergeTwoLists(list1, list2)\nmergedList.print() \u002F\u002F 输出 1 -> 2 -> 3 -> 4 -> 5 -> 6 -> null\n",[1120,1293,1291],{"__ignoreMap":1118},[1096,1295,1296],{},"更新中",{"title":1118,"searchDepth":1298,"depth":1298,"links":1299},4,[1300],{"id":1093,"depth":1301,"text":1094,"children":1302},2,[1303,1313],{"id":1102,"depth":1298,"text":1102,"children":1304},[1305,1307,1308,1309,1310,1311,1312],{"id":1106,"depth":1306,"text":1107},5,{"id":1124,"depth":1306,"text":1125},{"id":1137,"depth":1306,"text":1137},{"id":1153,"depth":1306,"text":1154},{"id":1168,"depth":1306,"text":1169},{"id":1183,"depth":1306,"text":1184},{"id":1198,"depth":1306,"text":1199},{"id":1219,"depth":1314,"text":1219,"children":1315},3,[1316,1317],{"id":1244,"depth":1306,"text":1244},{"id":1282,"depth":1306,"text":1282},"md",true,{"uuid":1321,"slots":1322},"ad883950-e14e-11f0-a497-bfd03a5050bc",{},{"title":1085,"description":1118},"posts\u002F2025\u002F2025-12-25-关于链表(Javascript)",[42,178,161],"BBZ-yNX_ry83R9OWj7YXXN-bX0C2DgZaxz5zoJdrACE",1790443287630]