yangshun / lago

📕 Data Structures and Algorithms library in TypeScript and JavaScript

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add Heap

yangshun opened this issue · comments

  • Heap class:
    • constructor()
    • size
    • isEmpty()
    • peek() // max or min depending on type of heap
    • insert()
    • extract()
    • static heapify<T>(arr: T[])
  • should cover min heap
  • should cover max heap

References

hi @yangshun can I work on this ?

Note that some part of #66 will cover this. Might make sense to add stuff on top of the existing Priority Queue data structure.

dully noted, I will check.
Thanks