GoCalf Calf 的自留地 · 昙花一现

3399. Smallest Substring With Identical Characters II

跟 3398. Smallest Substring With Identical Characters I 一模一样,只不过 s 的长度上限从 1000 增加到 10⁵。

https://leetcode.com/problems/smallest-substring-with-identical-characters-ii/

直接用上次的代码没问题(最大堆或二分法均可)。

评论需要 JavaScript。