title: Count Ways Divide Circle Using N Non Intersecting Chords
signature: class Solution {
  
      public long CountWaysDivideCircleUsingNNonIntersectingChords(int a) {
test_code: using System;
  using System.Numerics;
  using System.Diagnostics;
  using System.Collections.Generic;
  using System.Linq;
  using System.Text;
  using System.Security.Cryptography;
  using System.Web.UI;
  using System.Web.Script.Serialization;
  
  // SOLUTION CODE
  // ============================================
  PLACEHOLDER_CODE_BODY
  
  // TESTING CODE 
  // ============================================
  namespace EvaluatePrediction {
      class TestRunner {
          public bool ValidateSolution(long actual, long expected){
              return new JavaScriptSerializer().Serialize(actual) == new JavaScriptSerializer().Serialize(expected);
          }
  
          public string driver(int a, long expected){
              try{
                PLACEHOLDER_CLS_NAME solution_cls = new PLACEHOLDER_CLS_NAME();
                long pred_result = solution_cls.PLACEHOLDER_FN_NAME(a); 
                if (ValidateSolution(
                      pred_result,
                      expected)){
                  return "PASSED";
                }
                return "FAILED";
              } 
              catch (Exception exception_obj)
              {
                return exception_obj.GetType().FullName;
              }
          }
          static void Main(string[] args) {
              TestRunner runner = new TestRunner();
              String result;
              result = runner.driver(
                  32, 
                  55534064877048198
              );
              Console.WriteLine(string.Format(
                  "TEST-0...{0}",
                  result)
              );result = runner.driver(
                  32, 
                  55534064877048198
              );
              Console.WriteLine(string.Format(
                  "TEST-1...{0}",
                  result)
              );result = runner.driver(
                  31, 
                  14544636039226909
              );
              Console.WriteLine(string.Format(
                  "TEST-2...{0}",
                  result)
              );result = runner.driver(
                  29, 
                  1002242216651368
              );
              Console.WriteLine(string.Format(
                  "TEST-3...{0}",
                  result)
              );
          }
      }
  }
  
source_py: def count_ways_divide_circle_using_n_non_intersecting_chords(A):
      n = (2 * A)
      dpArray = ([0] * (n + 1))
      dpArray[0] = 1
      dpArray[2] = 1
      for i in range(4, (n + 1), 2):
          for j in range(0, (i - 1), 2):
              dpArray[i] += (dpArray[j] * dpArray[((i - 2) - j)])
      return int(dpArray[n])
source_cpp: int count_ways_divide_circle_using_n_non_intersecting_chords(int A) {
    int n = 2 * A;
    int dpArray [ n + 1 ] = {
      0 };
      dpArray [ 0 ] = 1;
      dpArray [ 2 ] = 1;
      for ( int i = 4;
      i <= n;
      i += 2 ) {
        for ( int j = 0;
        j < i - 1;
        j += 2 ) {
          dpArray [ i ] += ( dpArray [ j ] * dpArray [ i - 2 - j ] );
        }
      }
      return dpArray [ n ];
    }