LeetCode 1807. Evaluate the Bracket Pairs of a String
Input: s = "(name)is(age)yearsold", knowledge = [["name","bob"],["age","two"]]
Output: "bobistwoyearsold"
Explanation:
The key "name" has a value of "bob", so replace "(name)" with "bob".
The key "age" has a value of "two", so replace "(age)" with "two".Input: s = "hi(name)", knowledge = [["a","b"]]
Output: "hi?"
Explanation: As you do not know the value of the key "name", replace "(name)" with "?".Solution
PreviousLeetCode 1805. Number of Different Integers in a StringNextLeetCode 1808. Maximize Number of Nice Divisors
Last updated