DFS and BFS

these are traversing / searching algorithms.
on the case of the generating parenthesis it is used as a traversing algorithm ?

Depth first search (DFS) uses stack
Breadth first serach (bfs) uses Queue

you have a list to process
go from left to right
add each proccessed node to the data structure.

Pasted image 20240804125130.png