Search
⌘K

Leetcode 1807. Evaluate the Bracket Pairs of a String

Given a string containing non-nested bracketed keys and a list of key→value pairs, replace each "(key)" with its corresponding value or "?" if the key is unknown. The core challenge is to build a lookup map and perform an efficient single-pass parse (linear time) to reconstruct the resulting string for inputs up to 10^5 characters.

Asked at:

Google

Google


Question Timeline

See when this question was last asked and where, including any notes left by other candidates.

Early January, 2025

Google

Google

Junior

Evaluate the bracket pairs of a string (similar to LeetCode problem 1807)

Comments

Your account is free and you can post anonymously if you choose.