input: Write a function to determine the number of unique paths from a given source to a destination in an `m x n` grid. The only allowed movements are to the right or down. The function should take two arguments `m` and `n` representing the dimensions of the grid and return the number of unique paths.
  
  def num_unique_paths(m, n):
      dp = [[0 for x in range(m)] for y in range(n)] 
    
      # Number of ways to reach any cell in the first column is 1  
      for i in range(n): 
          dp[i][0] = 1
    
      # Number of ways to reach any cell in the first row is 1  
      for j in range(m): 
          dp[0][j] = 1
    
      # Calculate the number of ways to reach other cells using the recursive approach 
      for i in range(1, n): 
          for j in range(1, m): 
              dp[i][j] = dp[i-1][j] + dp[i][j-1]
    
      return dp[n-1][m-1]
  
  assert num_unique_paths(3, 2) == 3
  assert num_unique_paths(2, 3) == 3
  assert num_unique_paths(2, 2) == 2
  assert num_unique_paths(1, 1) == 1
  assert num_unique_paths(3, 3) == 6
output: def num_unique_paths(m, n):
      dp = [[0 for x in range(m)] for y in range(n)] 
    
      for i in range(n): 
          dp[i][0] = 1
    
      for j in range(m): 
          dp[0][j] = 1
    
      for i in range(1, n): 
          for j in range(1, m): 
              dp[i][j] = dp[i-1][j] + dp[i][j-1]
    
      return dp[n-1][m-1]