input: from typing import List
  
  def solve_maze(grid: List[List[int]]) -> List[int]:
      """Solve the maze by finding the shortest route from the top-left corner to the bottom-right corner.
      The maze is represented by a 2D list where 1s represent passable squares and 0s represent walls.
      If no path is found, return an empty list.
      
      >>> solve_maze([[1, 0, 0], [1, 1, 0], [0, 1, 1]])
      [4]
      >>> solve_maze([[1, 0, 0], [0, 1, 0], [0, 0, 1]])
      []
      """
output:     from collections import deque
  
      rows, cols = len(grid), len(grid[0])
      directions = [(0, 1), (1, 0), (0, -1), (-1, 0)]
      queue = deque([(0, 0, 0)])
      visited = set((0, 0))
  
      while queue:
          x, y, dist = queue.popleft()
  
          if (x, y) == (rows - 1, cols - 1):
              return [dist + 1]
  
          for dx, dy in directions:
              nx, ny = x + dx, y + dy
              if 0 <= nx < rows and 0 <= ny < cols and grid[nx][ny] == 1 and (nx, ny) not in visited:
                  visited.add((nx, ny))
                  queue.append((nx, ny, dist + 1))
  
      return []