[LeetCode] Evaluate the Bracket Pairs of a String

1 · · March 28, 2021, 4:44 a.m.
1807. Evaluate the Bracket Pairs of a String You are given a string s that contains some bracket pairs, with each pair containing a non-empty key. For example, in the string “(name)is(age)yearsold”, there are two bracket pairs that contain the keys “name” and “age”. You know the values of a wide range of keys. This is represented by a 2D string array knowledge where each knowledge[i] = [keyi, valuei] indicates that key keyi has a value of valuei. You are tasked to evaluate all of the bracket ...