Microsoft interview question

Traverse graph using a non-standard algorithm (interviewer explained the algorithm), then make sure that solution is m/t safe