From 2bc1a47c120a39d3a402332a84f7bc0d2481ed23 Mon Sep 17 00:00:00 2001 From: ZerenZhang2022 <118794589+ZerenZhang2022@users.noreply.github.com> Date: Sun, 27 Nov 2022 13:57:49 -0500 Subject: [PATCH] =?UTF-8?q?Update=200347.=E5=89=8DK=E4=B8=AA=E9=AB=98?= =?UTF-8?q?=E9=A2=91=E5=85=83=E7=B4=A0.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 原文打错字了:第207行应为“扫描所有频率的数值”,原文为“扫面所有频率的数值” --- problems/0347.前K个高频元素.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/problems/0347.前K个高频元素.md b/problems/0347.前K个高频元素.md index 56dbaa33..62bddbcd 100644 --- a/problems/0347.前K个高频元素.md +++ b/problems/0347.前K个高频元素.md @@ -204,7 +204,7 @@ class Solution: #定义一个小顶堆,大小为k pri_que = [] #小顶堆 - #用固定大小为k的小顶堆,扫面所有频率的数值 + #用固定大小为k的小顶堆,扫描所有频率的数值 for key, freq in map_.items(): heapq.heappush(pri_que, (freq, key)) if len(pri_que) > k: #如果堆的大小大于了K,则队列弹出,保证堆的大小一直为k