Skip to content

Commit 687fd03

Browse files
Update catalan_numbers.rs with complexity analysis.
1 parent 2e2ce80 commit 687fd03

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/dynamic_programming/catalan_numbers.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,12 @@
2727
///
2828
/// A vector containing Catalan numbers from C(0) to C(upper_limit)
2929
///
30+
/// # Complexity
31+
/// * Time complexity: O(n²)
32+
/// * Space complexity: O(n)
33+
///
34+
/// where `n` is the `upper_limit`.
35+
///
3036
/// # Examples
3137
///
3238
/// ```

0 commit comments

Comments
 (0)