Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

lc/340/ #4446

giscus[bot] bot announced in Announcements
lc/340/ #4446
May 28, 2025 · 1 comment
Discussion options

lc/340/

多种编程语言实现 LeetCode、《剑指 Offer(第 2 版)》、《程序员面试金典(第 6 版)》题解

https://leetcode.doocs.org/lc/340/?h=340

You must be logged in to vote

Replies: 1 comment

Comment options

 if (cnt.size() > k) {
 if (--cnt[s[l]] == 0) {
 cnt.erase(s[l]);
 }
 ++l;
 }

if (cnt.size() > k) 应该为 while

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
1 participant

AltStyle によって変換されたページ (->オリジナル) /