<?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/%E9%9D%A2%E8%AF%95%E9%AB%98%E9%A2%91%E9%A2%98/</link><description>Recent content in 面试高频题 on Jeanphilo Blog</description><generator>Hugo -- 0.159.2</generator><language>zh-cn</language><lastBuildDate>Thu, 04 Dec 2025 11:20:00 +0800</lastBuildDate><atom:link href="https://shio-chan-dev.github.io/jeanblog/zh/tags/%E9%9D%A2%E8%AF%95%E9%AB%98%E9%A2%91%E9%A2%98/index.xml" rel="self" type="application/rss+xml"/><item><title>经典 Binary Search：在排序数组中查找目标值索引的统一模板（LeetCode 704）</title><link>https://shio-chan-dev.github.io/jeanblog/zh/alg/leetcode/binary-search/704-binary-search/</link><pubDate>Thu, 04 Dec 2025 11:20:00 +0800</pubDate><guid>https://shio-chan-dev.github.io/jeanblog/zh/alg/leetcode/binary-search/704-binary-search/</guid><description>在有序数组中查找目标值：存在返回下标，不存在返回 -1。本文以 LeetCode 704 为例，用统一的二分模板讲清楚边界处理，并给出多语言实现和工程实践示例。</description></item><item><title>Hot100：Search Insert Position 排序数组中目标值插入位置的二分查找实战（LeetCode 35）</title><link>https://shio-chan-dev.github.io/jeanblog/zh/alg/leetcode/hot100/35-search-insert-position/</link><pubDate>Thu, 04 Dec 2025 11:10:00 +0800</pubDate><guid>https://shio-chan-dev.github.io/jeanblog/zh/alg/leetcode/hot100/35-search-insert-position/</guid><description>在有序数组中寻找目标值插入位置，使数组仍然有序：存在返回下标，不存在返回应插入的位置。本文用统一的 lower_bound 二分模板实现 Search Insert Position，并给出多语言代码与工程应用示例。</description></item><item><title>Hot100：在排序数组中查找元素的起始和结束位置，一套二分模板搞定 Search Range（LeetCode 34）</title><link>https://shio-chan-dev.github.io/jeanblog/zh/alg/leetcode/hot100/34-find-first-and-last-position-of-element-in-sorted-array/</link><pubDate>Thu, 04 Dec 2025 11:00:00 +0800</pubDate><guid>https://shio-chan-dev.github.io/jeanblog/zh/alg/leetcode/hot100/34-find-first-and-last-position-of-element-in-sorted-array/</guid><description>在有序数组中找到目标值的起始和结束位置（Search Range），要求 O(log n) 时间。本文用下界/上界二分模板彻底解决边界问题，并给出多语言代码和工程实践示例。</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>