<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>双指针 on Jeanphilo Blog</title><link>https://shio-chan-dev.github.io/jeanblog/zh/tags/%E5%8F%8C%E6%8C%87%E9%92%88/</link><description>Recent content in 双指针 on Jeanphilo Blog</description><generator>Hugo -- 0.159.2</generator><language>zh-cn</language><lastBuildDate>Wed, 11 Feb 2026 07:56:02 +0800</lastBuildDate><atom:link href="https://shio-chan-dev.github.io/jeanblog/zh/tags/%E5%8F%8C%E6%8C%87%E9%92%88/index.xml" rel="self" type="application/rss+xml"/><item><title>LeetCode 19：删除链表的倒数第 N 个结点（双指针一趟扫描）ACERS 全解析</title><link>https://shio-chan-dev.github.io/jeanblog/zh/alg/leetcode/hot100/linked-list/19-remove-nth-node-from-end-of-list/</link><pubDate>Wed, 11 Feb 2026 07:56:02 +0800</pubDate><guid>https://shio-chan-dev.github.io/jeanblog/zh/alg/leetcode/hot100/linked-list/19-remove-nth-node-from-end-of-list/</guid><description>从朴素两趟遍历到一趟快慢指针，系统讲清删除链表倒数第 N 个结点的思路、正确性、工程场景与多语言可运行实现。</description></item><item><title>Hot100：K 个一组翻转链表（Reverse Nodes in k-Group）分组反转 ACERS 解析</title><link>https://shio-chan-dev.github.io/jeanblog/zh/alg/leetcode/hot100/linked-list/25-reverse-nodes-in-k-group/</link><pubDate>Tue, 10 Feb 2026 10:01:23 +0800</pubDate><guid>https://shio-chan-dev.github.io/jeanblog/zh/alg/leetcode/hot100/linked-list/25-reverse-nodes-in-k-group/</guid><description>在单链表中每 k 个节点为一组进行原地反转，不足 k 的尾组保持不变。本文给出哑节点 + 分组扫描 + 原地反转模板，时间 O(n)、额外空间 O(1)，附多语言实现。</description></item><item><title>Hot100：环形链表 II（Linked List Cycle II）Floyd 判环 + 定位入环点 ACERS 解析</title><link>https://shio-chan-dev.github.io/jeanblog/zh/alg/leetcode/hot100/linked-list/142-linked-list-cycle-ii/</link><pubDate>Sun, 01 Feb 2026 21:40:21 +0800</pubDate><guid>https://shio-chan-dev.github.io/jeanblog/zh/alg/leetcode/hot100/linked-list/142-linked-list-cycle-ii/</guid><description>不修改链表的前提下返回入环的第一个节点：Floyd 快慢指针先相遇判环，再从头与相遇点同步前进定位入环点；O(n) 时间、O(1) 额外空间。</description></item><item><title>Hot100：合并两个有序链表（Merge Two Sorted Lists）哨兵节点归并 ACERS 解析</title><link>https://shio-chan-dev.github.io/jeanblog/zh/alg/leetcode/hot100/linked-list/21-merge-two-sorted-lists/</link><pubDate>Sun, 01 Feb 2026 21:40:06 +0800</pubDate><guid>https://shio-chan-dev.github.io/jeanblog/zh/alg/leetcode/hot100/linked-list/21-merge-two-sorted-lists/</guid><description>用哨兵节点 + 双指针在 O(m+n) 时间把两个升序链表“拼接式”合并为一个升序链表，并对比递归写法与常见坑，附多语言可运行实现（Hot100）。</description></item><item><title>Hot100：环形链表（Linked List Cycle）Floyd 快慢指针 ACERS 解析</title><link>https://shio-chan-dev.github.io/jeanblog/zh/alg/leetcode/hot100/linked-list/141-linked-list-cycle/</link><pubDate>Sun, 01 Feb 2026 18:45:44 +0800</pubDate><guid>https://shio-chan-dev.github.io/jeanblog/zh/alg/leetcode/hot100/linked-list/141-linked-list-cycle/</guid><description>用 Floyd 快慢指针在 O(n) 时间、O(1) 额外空间判断单链表是否有环，并对比哈希表方案、常见坑与工程迁移，附多语言可运行实现（Hot100）。</description></item><item><title>Hot100：相交链表（Intersection of Two Linked Lists）双指针换头 O(1) 空间 ACERS 解析</title><link>https://shio-chan-dev.github.io/jeanblog/zh/alg/leetcode/hot100/linked-list/160-intersection-of-two-linked-lists/</link><pubDate>Sun, 01 Feb 2026 16:29:40 +0800</pubDate><guid>https://shio-chan-dev.github.io/jeanblog/zh/alg/leetcode/hot100/linked-list/160-intersection-of-two-linked-lists/</guid><description>在不破坏链表结构的前提下找到两个单链表的相交起点：双指针“走完 A 再走 B”保证同步，O(m+n) 时间、O(1) 额外空间；含推导、工程迁移与多语言实现。</description></item><item><title>Hot100：轮转数组（Rotate Array）三次反转 ACERS 解析</title><link>https://shio-chan-dev.github.io/jeanblog/zh/alg/leetcode/hot100/189-rotate-array/</link><pubDate>Sat, 24 Jan 2026 12:29:42 +0800</pubDate><guid>https://shio-chan-dev.github.io/jeanblog/zh/alg/leetcode/hot100/189-rotate-array/</guid><description>用三次反转在 O(n) 时间完成轮转数组，含工程场景、常见误区与多语言实现。</description></item><item><title>Hot100：接雨水（Trapping Rain Water）双指针 / 前后最大值 ACERS 解析</title><link>https://shio-chan-dev.github.io/jeanblog/zh/alg/leetcode/hot100/42-trapping-rain-water/</link><pubDate>Sat, 24 Jan 2026 10:27:35 +0800</pubDate><guid>https://shio-chan-dev.github.io/jeanblog/zh/alg/leetcode/hot100/42-trapping-rain-water/</guid><description>用双指针与左右最大值在 O(n) 时间计算接雨水总量，含工程场景、常见误区与多语言实现。</description></item><item><title>固定间距 1 检测：一次扫描判断 1 之间至少 k 个间隔（LeetCode 1437）</title><link>https://shio-chan-dev.github.io/jeanblog/zh/alg/leetcode/1437-check-if-all-ones-are-at-least-k-places-away/</link><pubDate>Thu, 22 Jan 2026 09:12:14 +0800</pubDate><guid>https://shio-chan-dev.github.io/jeanblog/zh/alg/leetcode/1437-check-if-all-ones-are-at-least-k-places-away/</guid><description>用一次扫描判断所有 1 之间是否至少相隔 k 个位置，含工程场景、常见误区与多语言实现。</description></item><item><title>咒语与药水的成功组合：排序 + 二分查找秒杀乘积约束问题（LeetCode 2300）</title><link>https://shio-chan-dev.github.io/jeanblog/zh/alg/leetcode/2300-successful-pairs-of-spells-and-potions/</link><pubDate>Thu, 04 Dec 2025 10:50:00 +0800</pubDate><guid>https://shio-chan-dev.github.io/jeanblog/zh/alg/leetcode/2300-successful-pairs-of-spells-and-potions/</guid><description>给定 spells 和 potions 两个数组以及 success 阈值，如何用排序 + 二分查找在 O((n+m)log m) 时间内求出每个咒语能与多少药水形成乘积 ≥ success 的成功组合，并给出多语言实现与工程应用示例。</description></item><item><title>固定长度子数组 + 至少 m 个不同元素：几乎唯一子数组的最大和（LeetCode 2841）</title><link>https://shio-chan-dev.github.io/jeanblog/zh/alg/leetcode/2841-maximum-sum-of-almost-unique-subarray/</link><pubDate>Thu, 04 Dec 2025 10:40:00 +0800</pubDate><guid>https://shio-chan-dev.github.io/jeanblog/zh/alg/leetcode/2841-maximum-sum-of-almost-unique-subarray/</guid><description>给定整数数组 nums 和正整数 m、k，要求在所有长度为 k、且至少包含 m 个不同元素的子数组中，找到最大和；若不存在返回 0。本文用滑动窗口 + 计数哈希表推导 O(n) 解法，并提供多语言实现与工程应用示例。</description></item><item><title>最少涂色次数拿到 k 个连续黑块：滑动窗口的极简解法（LeetCode 2379）</title><link>https://shio-chan-dev.github.io/jeanblog/zh/alg/leetcode/2379-minimum-recolors-to-get-k-consecutive-black-blocks/</link><pubDate>Thu, 04 Dec 2025 10:30:00 +0800</pubDate><guid>https://shio-chan-dev.github.io/jeanblog/zh/alg/leetcode/2379-minimum-recolors-to-get-k-consecutive-black-blocks/</guid><description>给定只包含 W/B 的字符串 blocks，每次可将一个 W 涂成 B，如何用一次线性扫描求出得到至少一次连续 k 个黑色块的最少操作次数，并给出多语言实现与工程应用示例。</description></item></channel></rss>