This is an 8 puzzle and uses bfs and dfs to solve find the solution and prints out the path to the goal. I am having trouble poping and appending the ...
This is an 8 puzzle and uses bfs and dfs to solve find the solution and prints out the path to the goal. I am having trouble poping and appending the ...
I have the following example dataset with 3 columns, child entity, parent entity, ownership percentage of parent in that child: Note that D is the ...
I have written the code for checking whether a path exists between 2 vertices of a undirected, connected graph or not. I have stored my graph in an ad ...
I am trying to traverse a tree and create a Map data structure that holds only the first parent of the elements . key{child element} : value {array of ...
Consider a binary 2d array. I'm trying to count the number of connected zeros such that the shape created by these zeros is surrounded entirely by 1s ...
So I'm trying to create a program that finds the shortest path from nodeA to nodeB, however, I want to block certain nodes so that it would find anoth ...
This is a standard BFS finding the path through a 2D array maze of 1s and 0s to find a 9. when dequeue-ing, node coordinates are stored as a string t ...
This code finds a path through a binary matrix to a location with '9'. Each iteration, dequeues a root and checks if all children are in bound and co ...
I have written this piece of code to start a bfs traversal from element x in a given graph(from input) and finally print the number of visited vertice ...
I was tasked to write a program that finds the shortest path between a knight and a target tile in a chess board. The task specified to store knight's ...
Above code does not give any output. What is reason behind that? where I make mistake in above code Can anyone why above code give wrong answer for ...
I have a maze which consists of a dictionary (path), the maze has a dimension of (8,8). In the dictionary is decleared if it's possible to move up, do ...
Can someone describe the best possible step-by-step solution for this? Let 𝐺 = (𝑉, 𝐸) be a weighted graph with a weight function 𝑤: 𝐸→ℝ+ Gi ...
There are n rooms labeled from 0 to n - 1 and all the rooms are locked except for room 0. Your goal is to visit all the rooms. However, you cannot ent ...
I have an implementation of BFS that works just fine, but seems to get really CPU heavy, even at low depth (sub ms for a depth of 4 but 10 ms for a de ...
I've been doing Knights Travails project, and I just can't come up with a solution like I want: (should show the shortest possible way to get from one ...
As I was practicing C++ today, I came across a code which finds the shortest path in an unweighted graph using BFS and outputs the length of the path ...
I have a problem about getting all siblings from the main node and implementing the process n Breadth First Search algorithm written by Java. How can ...
My problem: I have a known root node that I'm starting with and a specific other target node that I'm trying to find the shortest path to. I'm trying ...
Intended Function of code: Takes a user input for the volume of 3 jars(1-9) and output the volumes with one of the jars containing the target length. ...