In the first post of this series, breadth first search…