Generate Parentheses - LeetCode 22 - Python #backtracking #recursion #leetcode

preview_player
Показать описание
Explaining how to solve Generate Parentheses in Python!

@0:33 - Example + Explanation
@6:35 - Code
@9:04 - Code Walkthrough with Example
@13:43 - Backtracking Explanation

Music: Bensound

Lemme know if you have any comments or questions!:)))

Рекомендации по теме
Комментарии
Автор

Mam, Please don't stop doing tutorials in python, there is no other channel that teaches data structures in python in more depth.

abhiramvanama
Автор

As someone not from a computer science background, recursion is something I’ve never gotten. 😅
The way I solved it is through adding parentheses as a character using sets.
Works!!
Recursion is very difficult for me to visualize😅

sumanthmurthy
Автор

Thanks, very simple and intuitive explaination.

There is another way, i remember watching
nth paranthesis is generated by appending all possible combinations of x and y parantheses such that
"(" + x + ")" + y where x+y+1 = n

GiridharaSaiPavanKumarGurram