def unique_paths(m: int, n: int) -> int:
    """
    Given a robot located at the top-left corner of a m x n grid
    that can only move either down or right at any point in time,
    returns the number of unique paths for the robot to reach the
    bottom-right corner.

    Arguments:
        m (int): Number of rows.
        n (int): Number of columns

    Assumptions:
        1 <= m, n <= 100. So the space, time complexity of an m x n array is bounded
        It's guaranteed that the answer will be <= 2 * 10 ^ 9

    Time complexity: O(n * m)
    Space complexity: O(n * m)
    """
    dp = [[0] * n for _ in range(m)]

    # recurrence
    for i in range(m):
        for j in range(n):
            # base case:
            # along all the walls there is only one path to have gotten there
            if i == 0 or j == 0:
                dp[i][j] = 1
            else:
                dp[i][j] = dp[i - 1][j] + dp[i][j - 1]

    return dp[-1][-1]