Tencent interview question

Q: Coding. Implement a code to find all bracket sequences of length 2n.

Interview Answer

Anonymous

15 Apr 2024

A: Use DFS with backtracking.