update 0347.前K个高频元素 改go代码一处时间复杂度错误
This commit is contained in:
parent
64a3c803b0
commit
380780256e
|
|
@ -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{}
|
||||
|
|
|
|||
Loading…
Reference in New Issue