def BFS(graph, s, t, parent):
    """
      Populates parent with nodes to visit and returns true if there are nodes left to visit

      Args:
        graph: an array of arrays of integers where graph[a][b] = c is the max flow, c, between a and b.
        s: Source of the graph
        t: Sink or "end" of the graph
        parent: Array holding the nodes to visit
    """
    # Start with none of the nodes visited
    visited = [False] * len(graph)
    # Begin queue at source. Will hold all nodes yet to visit
    queue = []
    queue.append(s)
    # "Visited" aka will visit source node
    visited[s] = True
    # While there are still nodes in queue
    while queue:
        # Current searching node
        u = queue.pop(0)
        # Check each possible connection
        for ind in range(len(graph[u])):
            # If that connection hasn't been visited and is recieving source
            if visited[ind] is False and graph[u][ind] > 0:
                # Add the connection to the queue of ones to search
                queue.append(ind)
                # Set it to being visited
                visited[ind] = True
                # Add the search to the parent
                parent[ind] = u

    return True if visited[t] else False