Wrote breadth first search algorithm to find linked data