Category "dijkstra"

Google foobar challenge (Prepare the bunnies escape)

I recently received an invitation to a google foobar challenge I am currently on level 3. I've written a code which passes 3/5 test cases and I can't seem to fi

What is the time complexity of Dijkstra's Algorithm? Am I implementing my code right?

I was trying to implement Dijkstra's SPA for the LeetCode Question #743, but I wasn't sure if my algorithm was written in the most efficient manner. Would I be

In SPFA Shortest Path Faster Algorithm why does it have to check if current vertex is in queue before adding it to queue?

procedure Shortest-Path-Faster-Algorithm(G, s) 1 for each vertex v ≠ s in V(G) 2 d(v) := ∞ 3 d(s) := 0 4 push s into Q 5 w

Throw an error if multiple shortest paths are found

Given an undirected weighted graph, a start, and an end point. You need to find the shortest path to that end point, but throw an error if multiple shortest pat

Finding the shortest path with only passing specific edge less or equal to one time in Graph

Given a undirected graph that it has ordinary edges and specific edges, our goal is to find the sum of the shortest path's weight between two vertices(start ve

Seam Carving an image using Dijkstra algorithm in C++

I am trying to implement Seam carving using Dijkstra's algorithm. So far, I have converted the image to grayscale and using a 2D array, I've found out the ene

Finding shortest path of undirected weighted graph in prolog

I am trying to do a shortest path for a London underground system inside prolog, and I'm stuck I've managed to get the code to return lists of all the possible