I've been following a tutorial to try and wrap my head around Dijkstra's shortest path algorithm. Originally it was in Java, but I tried my best to switch it over to C++, but unfortunately I've run ...

Sorry by the first ask, I'm new at the hood... I did a cleaning on the code. The problem is:
I have a square grid with paths and obstacles. I want to find the shortest path from a point to another. ...

Given an undirected（no lengths） graph G=(V,E) with |V|=n and |E|= m, and two vertices v,w, find the algorithm that outputs the number of shortest v-w-paths in G. The running time should be O(m+n)
I ...

Suppose you are given a 2d array as a pacman game. The gameboard size is N*N
- Give an algorithm an implement it in JAVA that given a gameboard, counts the number of ghosts (marked with G), that can ...

I'm trying to store the path Dijkstra's does when it calculates shortest path to every vertice from the source. This is currently what I'm doing right now but I'm struggling with how to actually store ...

So I have been trying to implement the Dijkstra Algorithm for shortest path in a directed graph using adjacency lists, but for I don't know what reason, it doesn't print out the results (prints the ...

Given a set of Y Points (locations) with Longitude and Latitude, what is the shortest path that crosses a Unique set of X points?
Just a algorithm problem I was having when designing a database. Not ...

My problem is the following.
I have a "backup" node and others nodes.
From theses nodes, I need to generate a common path to the backup node which is minimal (unweighted and undirected graph)
I don't ...

I have a set of N points for which I have coordinates (Ordnance Survey grid references). I want to start at point A and finish at point B and visit all the other points along the way, with the least ...

I want to ask you a question, since I need this to move on,
what is the shortest possible depth of a leaf in decision tree refering to comparision sorting algorithm ?
Does it change depending on the ...

I have a question for Priority based preemptive Shortest Job First algorithm. If two processes have the same priority, who is the one to go first. The one that was put in first or the one with smaller ...

I am recursively building a graph in java using the graphstream library.. however this graph is so huge so that the recursion is very deep and this ends in stackoverflow. Believe me, even an iteration ...

I am looking for a solution for a task similar to the Tower of Hanoi task, however this is different from Hanoi as the disks are not constrained by size. The Tower of London task I am creating has 8 ...

I need some help with the math behind an assignment i was given. The problem was to calculate the distance from the ant to the candy. The candy is always on top of the box and the ant can be anywhere ...

I'm having trouble with my homework assignment(C++). I'm not asking for the complete solution, but tilt in the right direction could be helpful. :)
I have a NxN board (max N = 100) and a 1x2 figure ...

I have a really difficult problem to solve and Im just wondering what what algorithm can be used to find the quickest route. The undirected graph consist of positive and negative adjustments, these ...

I've stampled upon a curious problem.
I've got an unbounded chessboard, N knights starting locations and N target locations.
The task is to find minimal number of moves for all knights to reach all ...

I need some help with my A* algorithm implementation.
When I run the algorithm it does find the goal, but the path is definately not the shortest :-P
Here is my code, please help me spot the bugs!
I ...

In my particular case, the graph is represented as an adjacency list and is undirected and sparse, n can be in the millions, and d is 3. Calculating A^d (where A is the adjacency matrix) and picking ...