import Heap from '../../DataStructure/Heap/Heap' ; param { number [ ] } array param { string } type function HeapSort ( array , type ) { const len = array . length ; let heap = new Heap ( type ) ; heap . create ( array ) ; let result = [ ] ; for ( let i = 0 ; i < len ; i ++ ) { result . push ( heap . pop ( ) ) ; } return result ; } export default HeapSort ;