title: Count Possible Paths Top Left Bottom Right Nxm Matrix 2
signature: def count_possible_paths_top_left_bottom_right_nxm_matrix_2(p, q):
source_py: def count_possible_paths_top_left_bottom_right_nxm_matrix_2(p, q):
      dp = [1 for i in range(q)]
      for i in range((p - 1)):
          for j in range(1, q):
              dp[j] += dp[(j - 1)]
      return dp[(q - 1)]
source_cpp: int count_possible_paths_top_left_bottom_right_nxm_matrix_2(int m, int n) {
    int dp [ n ] = {
      1 };
      dp [ 0 ] = 1;
      for ( int i = 0;
      i < m;
      i ++ ) {
        for ( int j = 1;
        j < n;
        j ++ ) {
          dp [ j ] += dp [ j - 1 ];
        }
      }
      return dp [ n - 1 ];
    }
question_info.test_code: import array
  import bisect
  import collections
  import datetime
  import functools
  import heapq
  import itertools
  import math
  import queue
  import re
  import string
  import sys
  from typing import Any, Dict, List, Optional, Set
  
  
  # SOLUTION CODE
  # ============================================
  PLACEHOLDER_CODE_BODY
  
  # TESTING CODE 
  # ============================================
  def validate_solution(actual, expected):
      return actual == expected
  
  def driver(p, q, expected):
      try:
          if validate_solution(PLACEHOLDER_FN_NAME(
              p, q),
              expected
          ):
              return "PASSED"
          return "FAILED"
      except Exception as exception_obj:
          return type(exception_obj).__name__
      
  if __name__ == "__main__":
      result = driver(70, 5, 1088430)
      print(f"TEST-0...{result}")
  
      result = driver(9, 59, 5743572120)
      print(f"TEST-1...{result}")
  
      result = driver(54, 1, 1)
      print(f"TEST-2...{result}")
  
      sys.exit(0)
question_info.test_case_ids: ['0', '1', '2']
question_info.entry_fn_name: count_possible_paths_top_left_bottom_right_nxm_matrix_2
question_info.test_list: [{"idx": 0, "outputs": 1088430, "inputs": {"p": 70, "q": 5}}, {"idx": 1, "outputs": 5743572120, "inputs": {"p": 9, "q": 59}}, {"idx": 2, "outputs": 1, "inputs": {"p": 54, "q": 1}}]
question_info.entry_cls_name: Solution