Skip to content

Instantly share code, notes, and snippets.

View RexKizzy22's full-sized avatar
💫

Emmanuel Inegbenose RexKizzy22

💫
  • Lagos, Nigeria
View GitHub Profile
@RexKizzy22
RexKizzy22 / pathfinder.go
Last active February 20, 2024 14:47
The pathfinder solution code for my article Demystifying Recursion - Part 2
type Point struct {
x int
y int
}
type Path = []Point
func findPath(maze []string, wall string, start Point, end Point) Path {
adjacents := [][]int{[]int{0, 1}, []int{1, 0}, []int{0, -1}, []int{-1, 0}}
seen := [][]bool{}