title: Sum Squares Binomial Coefficients
signature: class Solution {
  
      public Long sumSquaresBinomialCoefficients(Integer n) {
source_py: def sum_squares_binomial_coefficients(n):
      C = [[0 for i in range((n + 1))] for j in range((n + 1))]
      for i in range(0, (n + 1)):
          for j in range(0, (min(i, n) + 1)):
              if ((j == 0) or (j == i)):
                  C[i][j] = 1
              else:
                  C[i][j] = (C[(i - 1)][(j - 1)] + C[(i - 1)][j])
      sum = 0
      for i in range(0, (n + 1)):
          sum = (sum + (C[n][i] * C[n][i]))
      return sum
source_cpp: int sum_squares_binomial_coefficients(int n) {
    int C [ n + 1 ] [ n + 1 ];
    int i, j;
    for ( i = 0;
    i <= n;
    i ++ ) {
      for ( j = 0;
      j <= min ( i, n );
      j ++ ) {
        if ( j == 0 || j == i ) C [ i ] [ j ] = 1;
        else C [ i ] [ j ] = C [ i - 1 ] [ j - 1 ] + C [ i - 1 ] [ j ];
      }
    }
    int sum = 0;
    for ( int i = 0;
    i <= n;
    i ++ ) sum += ( C [ n ] [ i ] * C [ n ] [ i ] );
    return sum;
  }
question_info.extension: java
question_info.entry_fn_name: sumSquaresBinomialCoefficients
question_info.entry_cls_name: Solution
question_info.test_list: [{"idx": 0, "outputs": 35345263800, "inputs": {"n": 19}}, {"idx": 1, "outputs": 32247603683100, "inputs": {"n": 24}}, {"idx": 2, "outputs": 2104098963720, "inputs": {"n": 22}}, {"idx": 3, "outputs": 155117520, "inputs": {"n": 15}}]
question_info.test_code: import static java.util.Map.entry;  
  import java.util.*;
  import java.lang.*;
  // TESTING CODE 
  // ============================================
  class QuestionEvaluator {
      public static String validateSolution(Integer n, Long expected){
          try{
              Driver driver = new Driver();
              if (driver.run(n,expected)){
                  return "PASSED";
              }
              return "FAILED";
              
          } catch (Exception exception_obj){
              return exception_obj.getClass().getSimpleName();
          }
  
      }
      public static void main(String[] args) {
          String result;
          result = validateSolution(19, 35345263800L);
          System.out.println(String.format("%s%s","TEST-0...",result));    
      
          result = validateSolution(24, 32247603683100L);
          System.out.println(String.format("%s%s","TEST-1...",result));    
      
          result = validateSolution(22, 2104098963720L);
          System.out.println(String.format("%s%s","TEST-2...",result));    
      
          result = validateSolution(15, 155117520L);
          System.out.println(String.format("%s%s","TEST-3...",result));    
      
      }
  }
  
  class Driver{
      public boolean run(Integer n, Long expected){
  
          PLACEHOLDER_CLS_NAME sol = new PLACEHOLDER_CLS_NAME();
          return validateSolution(sol.PLACEHOLDER_FN_NAME(n),expected);
      }
      
      public boolean validateSolution(Long actual, Long expected){
          return actual.equals(expected);
      }
  }
  
  
  // SOLUTION CODE
  // ============================================
  PLACEHOLDER_CODE_BODY
question_info.test_case_ids: 0 1 2 3
question_info.commands: java __FILENAME__