aalhour/C-Sharp-Algorithms

MaxHeap bad algorithm.

開放

#84 建立於 2018年12月28日

 (2 則留言) (0 個反應) (0 位負責人)C# (1,409 個分叉)batch import
buggood first issue

倉庫指標

星標
 (5,736 顆星)
PR 合併指標
 (30 天內沒有已合併 PR)

描述

steps to reproduce

Write a loop, from 1 to 80000, each time add a random int to the max heap.

In theory it takes very little time(NlogN, N=80000, <1sec ), but the program does take a long time.

I'v also tested the BinaryHeap in https://github.com/SolutionsDesign/Algorithmia, it performs well, so it is probably due to the bad algorithm.

貢獻者指南