Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I used a min heap in a FANG interview. It's an obvious/good solution if the problem has a mix of reading/removing the smallest number in a data structure and writing new numbers to the data structure.


A min heap is different from a min-max heap. A min-max heap supports the operations of both a min heap and a max heap (essentially by interleaving the two). A normal min heap is a standard data structure, a min-max heap less so.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: