educative.io

Mapping with Subsets and Balanced Parenthesis

I am having trouble understanding the mapping between the solution/approach in this Problem Challenge and the Subsets and Balanced Parenthesis problem. While I understand the solution, and was able to relate to it, from being aware of expression trees used to evaluate arithmetic expressions in compilers, I am not being able to see the connection between the solution here and earlier problems in this section.

3 Likes

Breadth First Search pattern in building strings at next level of the tree is the similarity.

1 Like