def bfs(self, rooms, x, y):
        m = len(rooms)
        n = len(rooms[0])
        level = 0
        q = [(x, y)]
        while q:
            l = len(q)
            for idx in xrange(l):
                i, j = q[idx]
                rooms[i][j] = min(rooms[i][j], level)
                for d in self.dirs:
                    i_t = i+d[0]
                    j_t = j+d[1]
                    if 0 <= i_t < m and 0 <= j_t < n and rooms[i_t][j_t] != -1 and level+1 >= rooms[i_t][j_t]:
                        q.append((i_t, j_t))

            q = q[l:]
            level += 1
dataset/ETHPy150Open algorhythms/LeetCode/286 Walls and Gates.py/Solution_slow.bfs/swapped operands of `>=`