How to create min-heap and max-heap without using class in Javascript
How can I create an min-max heap without using class, as I'm solving K largest elements problem for that I want to create a min-heap without using class. Is it possible in javascript?