News for hackers. Stuff that matters.
Re:Show HN: BFS, Dijkstra and A* interactive demo made in React by vladimirralev on Monday January 18, 2021 @01:37PM (#25824950)
I think your priority queue is doing O(nlogn) sort for every insert https://github.com/npretto/pathfinding/blob/master/src/algo/...

This should be a heap with O(logn) insert instead to be truly Dijsktra/A*

Re:Show HN: BFS, Dijkstra and A* interactive demo made in React by jschulenklopper on Monday January 18, 2021 @03:17PM (#25826097)
Dijkstra / A* search algorithm do not prescribe which algorithm to use to add/insert items to the queue, or which algorithm to use to maintain a priority queue. So, your optimization might be an improvement, but it doesn't make the process "more or less" truly Dijkstra or A*.