I want you to start a blank slate C (or C++) project. Ask Google how to write heapify, push_heap, and pop_heap in C. Ask ChatGPT the same.
I did this a few weeks ago. I literally could not find the answer on Google. ChatGPT gave me actual C code that I definitely did not trust but did verify.
Google results for questions like that are genuinely awful. It’s full of shitty tutorial websites that are full of ads and either don’t have the answer I need or don’t have it in a convenient form.