aalhour/C-Sharp-Algorithms

MaxHeap bad algorithm.

Ouverte

#84 ouverte le 28 déc. 2018

 (2 commentaires) (0 réaction) (0 personne assignée)C# (1 409 forks)batch import
buggood first issue

Métriques du dépôt

Stars
 (5 736 étoiles)
Métriques de merge PR
 (Aucune PR mergée en 30 j)

Description

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.

Guide contributeur