Graph Tree Traversal

15 February, 2016
Python Algorithms

Graph based problems are common in interviews. Even though i find interviews hard, i recently interviewed at a exciting startup startup in bangalore and they gave me a problem I was asked to code it up.

Problem Statement:
Given a grid where there are bombs, walls and a exit. Write a bot that can traverse this map and find the exit.
  • A bot cannot go outside of the grid.
  • Player if over bomb, bomb gives a certain damage to the player. Player has a health which gets depleted
  • Player cannot move over a wall.
A DFS based implementation for a player in RPG kind of map to find the exit.


RPG Clear Github
Thank you for taking the time to read this post. If you're considering using Digital Ocean, the hosting provider this blog is hosted on, please consider using this link to sign up.