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

Commit 2bc1a47

Browse files
Update 0347.前K个高频元素.md
原文打错字了:第207行应为"扫描所有频率的数值",原文为"扫面所有频率的数值"
1 parent 5fc3187 commit 2bc1a47

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

‎problems/0347.前K个高频元素.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ class Solution:
204204
#定义一个小顶堆,大小为k
205205
pri_que = [] #小顶堆
206206

207-
#用固定大小为k的小顶堆,扫面所有频率的数值
207+
#用固定大小为k的小顶堆,扫描所有频率的数值
208208
for key, freq in map_.items():
209209
heapq.heappush(pri_que, (freq, key))
210210
if len(pri_que) > k: #如果堆的大小大于了K,则队列弹出,保证堆的大小一直为k

0 commit comments

Comments
(0)

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