Microsoft Interview Question

Question on bread first search