Problem 465. Dick Van Dyck?

Created by Amitava Biswas
  • Not the celebrity, Dick Van Dyke,
  • this problem relates to balanced strings of parentheses, Dyck Language.
  • Please attach the depth value and a space next to each parenthesis according to following style.
  • For example, change '<(DVD)[MTM]>' to '<1 (2 DVD 2)[2 MTM 2] 1>'.
  • Please try a general solution, the test suite may expand.

Problem Group

6 solvers submitted 23 solutions (3.83 solutions/solver).