title: Dyck Path
signature: double dyckPath(int n) {
test_code: #include <algorithm>
  #include <assert.h>
  #include <cstdlib>
  #include <iostream>
  #include <map>
  #include <set>
  #include <string>
  #include <tuple> 
  #include <unordered_map>
  #include <vector>
  #include <math.h>
  #include <cmath>
  #include <bits/stdc++.h>
  #include <numeric>
  #include <functional>
  
  using namespace std;
  
  // SOLUTION CODE
  // ============================================
  PLACEHOLDER_CODE_BODY
  
  // TESTING CODE 
  // ============================================
  bool validateSolution(double actual, double expected){
      return abs(actual - expected) < 1e-09;
  }
  
  string driver(int n, double expected){
      try
      {
          if (validateSolution(PLACEHOLDER_FN_NAME(n), expected)){
              return "PASSED";
          }
          return "FAILED";
      }
      catch (const std::overflow_error& exception_obj)
      {
          return typeid(exception_obj).name();
      }
      catch (const std::runtime_error& exception_obj)
      {
          return typeid(exception_obj).name();
      }
      catch (const std::exception& exception_obj)
      {
          return typeid(exception_obj).name();
      }
      catch (...)
      {
          return "UNK_ERROR";
      }
  }
  
  int main() {
      string result = "";
  
      result = driver(28, 263747951750360.03); 
      cout << "TEST-" << 0 << "..."
           <<  result
           << "\n";
  
      result = driver(13, 742900.0); 
      cout << "TEST-" << 1 << "..."
           <<  result
           << "\n";
  
      result = driver(7, 429.0); 
      cout << "TEST-" << 2 << "..."
           <<  result
           << "\n";
  
      return 0;
  }
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 );
  }