LeetCode solution in Golang - Generate Parentheses

  Рет қаралды 33

Mandu 2 Fundu

Mandu 2 Fundu

Күн бұрын

Пікірлер: 2
@mandu2fundu497
@mandu2fundu497 2 ай бұрын
Link to the Question: leetcode.com/problems/generate-parentheses If you think that I missed something in my implementation or if there is a better solution, please mention that in the comment section.
@mandu2fundu497
@mandu2fundu497 2 ай бұрын
My space complexity analysis in this video is not correct. It should be O(n ^ 2). At every recursive call, new parenthesisSlice is created with one extra space. So, the total space used for parenthesisSlice at the leaf node is 0 + 1 + 2 + .... + 2 * n. which O(n^2).
LeetCode solution in Golang - Combinations
21:41
Mandu 2 Fundu
Рет қаралды 26
LeetCode solution in Golang - Zigzag Conversion
31:45
Mandu 2 Fundu
Рет қаралды 29
-5+3은 뭔가요? 📚 #shorts
0:19
5 분 Tricks
Рет қаралды 13 МЛН
LeetCode solution in Golang - Trap Rain Water
25:20
Mandu 2 Fundu
Рет қаралды 143
LeetCode solution in Golang - Word Ladder
30:02
Mandu 2 Fundu
Рет қаралды 29
LeetCode solution in Golang - Palindrome Number
15:01
Mandu 2 Fundu
Рет қаралды 93
LeetCode solution in Golang - Rotate Image
25:46
Mandu 2 Fundu
Рет қаралды 66
LeetCode solution in Golang - Course Schedule II
24:24
Mandu 2 Fundu
Рет қаралды 122
LeetCode solution in Golang - Spiral Matrix
35:17
Mandu 2 Fundu
Рет қаралды 33
LeetCode solution in Golang - Path Sum
13:21
Mandu 2 Fundu
Рет қаралды 23
LeetCode solution in Golang - Isomorphic Strings
14:31
Mandu 2 Fundu
Рет қаралды 61