Filter an N-ary Tree and Render It with Indentation

Problem: Filter an N-ary Tree and Render It with Indentation

You are given an N-ary tree. Each node has:

  • value: a string
  • children: a list of child nodes

You are also given a string `quer...

Example

Unlock to view complete problem details

and practice with sample input/output

Was this article helpful?

View Test Cases & Run Code requires membership

Standard Input
Execution Result: