Challenge: Print Parenthesis Number

Let’s label opening and closing parentheses with numbers.

Problem

Given an expression, number each parenthesis pair such that for each pair, the opening and closing parenthesis have the same number.

Get hands-on with 1400+ tech skills courses.