[HELP] Heap implementation in javascript in an interview

As we don't have a native implementation for heap and implementing it is hard/time-consuming in interviews, How do you deal with questions that involve heaps or priority queues when your language of preference is javascript?

Can we mock it? We can implement it really quickly using the arrays and sort method. I haven't done that yet in any interview. Is it ok?

Comments (1)