DEV Community

Discussion on: Solution: Furthest Building You Can Reach

Collapse
 
midasxiv profile image
Midas/XIV

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.

Collapse
 
seanpgallivan profile image
seanpgallivan

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.