TheAlgorithms/JavaScript

[OTHER]: why element is array in Max Heap?

GongSunJie-Plus opened this issue · 3 comments

What would you like to share?

maxHeap.insert([4])

just use number

maxHeap.insert(4)

Additional information

No response

The example seems to be wrong; we should just remove it. Moreover, the max heap seems redundant with our min heap. Feel free to deduplicate the code.

@appgurueu Could you please assign me this issue .

@appgurueu Could you please assign me this issue .

I think @ROHAN13498 is already working on deduplicating the code.