I really enjoyed reading this, great article. The best part has to be how you pointed out the npm package shortcomings in JS and the caveats to solve the problem in C++ by inverting the sign before adding to a priority queue.
I will admit that I felt a little bit bad about including an entire heap implementation (even if only for one JS solution) without actually going into how the heap structure works, but it really does provide much more efficient processing than the MinPriorityQueue npm, which is also obviously not in the standard library.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
I really enjoyed reading this, great article. The best part has to be how you pointed out the npm package shortcomings in JS and the caveats to solve the problem in C++ by inverting the sign before adding to a priority queue.
Thanks for the response!
I will admit that I felt a little bit bad about including an entire heap implementation (even if only for one JS solution) without actually going into how the heap structure works, but it really does provide much more efficient processing than the MinPriorityQueue npm, which is also obviously not in the standard library.