mirror of
https://github.com/TheAlgorithms/C-Plus-Plus.git
synced 2026-04-15 19:30:07 +08:00
formatting source-code for d7af6fdc8c
This commit is contained in:
@@ -9,7 +9,7 @@
|
||||
#include <iostream>
|
||||
using namespace std;
|
||||
|
||||
int *cat; // global array to hold catalan numbers
|
||||
int *cat; // global array to hold catalan numbers
|
||||
|
||||
unsigned long int catalan_dp(int n)
|
||||
{
|
||||
@@ -33,7 +33,7 @@ unsigned long int catalan_dp(int n)
|
||||
{
|
||||
cat[i] = 0;
|
||||
for (int j = 0; j < i; j++)
|
||||
cat[i] += cat[j] * cat[i - j - 1]; // applying the definition here
|
||||
cat[i] += cat[j] * cat[i - j - 1]; // applying the definition here
|
||||
}
|
||||
|
||||
// Return the result
|
||||
|
||||
Reference in New Issue
Block a user