Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // to_vist = []; visited = []; end = Z
- // in current position X
- // possible moves from X are Y[0] to Y[7]
- // if Y[N] in visited then skip
- // if Y[N] is valid then add to to_visit
- // pop head of to_visit as new X
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement