Skip to content

Commit ad8540e

Browse files
authored
Update README.md
1 parent ef9b750 commit ad8540e

File tree

1 file changed

+3
-7
lines changed
  • Competitive Coding/Math/Catalan_Numbers

1 file changed

+3
-7
lines changed

Competitive Coding/Math/Catalan_Numbers/README.md

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,12 @@ They're similar to Fibonacci (very slightly)
55
The 2 different implementations vary only in terms of time taken!<br>
66
Basically we can implement in 3 different ways!<br>
77

8-
(1) Recursively <br>
9-
(2) Dynamic Programming <br>
10-
(3) Binomial Coefficient <br><br>
8+
* Recursively - Exponential time complexity<br>
9+
* Dynamic Programming - O(n^2)<br>
10+
* Binomial Coefficient - O(n) <br><br>
1111

1212
Each of the above 3 implementations have a descending order of time complexities from (1) to (3) <br><br>
1313

14-
For (1) the time complexity is exponential<br>
15-
For (2) the time complexity is O(n^2)<br>
16-
For (3) the time complexity is O(n)<br><br>
17-
1814
The Binomial implementation has the best time complexity while the Recursive implementation has the worst time complexity<br>
1915
In this folder we have the Binomial and Recursive implementations of Catalan Numbers.<br><br>
2016

0 commit comments

Comments
 (0)