diff --git a/algorithms/Java/Maths/catalan-numbers.java b/algorithms/Java/Maths/catalan-numbers.java new file mode 100644 index 00000000..e433689e --- /dev/null +++ b/algorithms/Java/Maths/catalan-numbers.java @@ -0,0 +1,39 @@ +// Program to print Catalan Numbers till n using recursive approach. + +import java.util.*; + +class CatalanNumbers{ + + public static int findCat(int n){ + + int val = 0; + + if (n<=1) return 1; + + for (int i=0;i