update 0347.前K个高频元素 改go代码一处时间复杂度错误

This commit is contained in:
Yuhao Ju
2022-11-28 00:28:16 +08:00
committed by GitHub
parent 64a3c803b0
commit 380780256e

View File

@ -271,7 +271,7 @@ func (h *IHeap) Pop() interface{}{
}
//方法二:利用O(logn)排序
//方法二:利用O(nlogn)排序
func topKFrequent(nums []int, k int) []int {
ans:=[]int{}
map_num:=map[int]int{}