Skip to content

Commit 2cd7782

Browse files
committed
Day 61 update catalan comments
1 parent f2946ae commit 2cd7782

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

dynamic_programming_problems/catalan_number.cpp

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,17 @@
44
* n = 1 , num of BST - 1
55
* n = 2 , num of BST - 2
66
*
7-
* 2 1
8-
* / and \
7+
* 2 1
8+
* / and \
99
* 1 2
1010
*
1111
* n = 3, num of BST - 5
1212
*
13-
* 3 1 2 2 3
14-
* / \ / \ \ /
15-
* 2 and 2 and 1 3 and 3 and 1
16-
* / \ / \
17-
* 1 3 1 2
13+
* 3 1 2 2 3
14+
* / \ / \ \ /
15+
* 2 and 2 and 1 3 and 3 and 1
16+
* / \ / \
17+
* 1 3 1 2
1818
*
1919
* So, If we choose, ith element as root, there will be i-1 elements on the
2020
* left subtree and n-i on the right. The two side subtrees would be independent

0 commit comments

Comments
 (0)