Skip to content

abdallahabusidu/Pathfinding-Visualizer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

14 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿ‘พ Pathfinder Visualizer

Using the BFS Algorithm I'm making the Pathfinder Visualizer

๐ŸŒ€ BFS Algorithm

  • A graph is a data structure which consists of a finite set of nodes (or vertices) with a set of edges connecting a pair of nodes (or vertices).

  • BFS and DFS are the most basic of graph algorithms which opens the gateway to learning numerous other algorithms based on graphs.

image

The thing is that we should be able to find our way through this maze above.

  • BFS uses queue data structure
  1. We have to map out our data structure.
    • We have to choose between adjacency matrix or adjacency list.

Adjacency matrix is an n x n array ( what we know as 2D) where the horizontal axis represents the vertices and vertical axis represents the edges. When we look at the adjacency matrix below. If we insert the vertices we listed earlier, you will see that on the first column, you have two 1s, in the second position and in the fifth position.

image

๐Ÿ”Œ How it's work

๐Ÿ“ธ ScreenShots