As reported: Okta Staff Software Engineer (May 2026), round 1 (Java & DSA): a discussion of the most challenging project and its design trade-offs, then LeetCode 1190 — solved optimally after a minor hint.
Given a string s of lowercase letters and balanced parentheses, reverse the substring inside each pair of matching parentheses, starting from the innermost one, and return the result without any brackets. This is LeetCode 1190 — Reverse Substrings Between Each Pair of Parentheses.
Example 1
s = "(abcd)" -> "dcba"
Example 2
s = "(u(love)i)" -> "iloveu"
Constraints: 1 ≤ s.length ≤ 2000; s holds lowercase letters and parentheses; the parentheses are balanced.
Code runner format: one JSON value per line: s (LeetCode's format). Implement reverseParentheses(s); the harness prints the string.