title: Dyck Path
signature: function dyckPath(n: number): number {
source_py: def dyck_path(n):
      res = 1
      for i in range(0, n):
          res *= ((2 * n) - i)
          res /= (i + 1)
      return (res / (n + 1))
source_cpp: int dyck_path(unsigned int n) {
    int res = 1;
    for ( int i = 0;
    i < n;
    ++ i ) {
      res *= ( 2 * n - i );
      res /= ( i + 1 );
    }
    return res / ( n + 1 );
  }
question_info.test_list: [{"idx": 0, "outputs": 263747951750360.03, "inputs": {"n": 28}}, {"idx": 1, "outputs": 742900.0, "inputs": {"n": 13}}, {"idx": 2, "outputs": 429.0, "inputs": {"n": 7}}]
question_info.entry_cls_name: Solution
question_info.test_code: 
  
  // SOLUTION CODE
  // ============================================
  PLACEHOLDER_CODE_BODY
  
  // TESTING CODE 
  // ============================================
  function convertToString(value: any): string{
      return JSON.stringify(value, function (key, val) {
          if (val instanceof Set) {
              return Array.from(val);
          } return val;});
  }
  
  function validateSolution(actual: number, expected: number): boolean {
      return Math.abs(actual - expected) < 1e-09;
  }
  
  function driver(n: number, expected:number): string {
      try{
          if (validateSolution(PLACEHOLDER_FN_NAME(n),expected)){
              return "PASSED";
          }
          return "FAILED";
      } catch (error) {
        return error.name;
      }
      
  }
      
  function main(){
    let result = '';
    result = driver(28, 263747951750360.03);
    console.log(`TEST-0...${result}`);
  
    result = driver(13, 742900.0);
    console.log(`TEST-1...${result}`);
  
    result = driver(7, 429.0);
    console.log(`TEST-2...${result}`);
  
  };
  
  main();
question_info.extension: ts
question_info.entry_fn_name: dyckPath
question_info.test_case_ids: 0 1 2
question_info.commands: tsc --target es2020 --lib es5,dom,es2015,es2020 __FILENAME__
question_info.commands: node __FILENAME__.js