Amazon Interview Question

They asked me two DSA questions during the interview: LeetCode 767 – Reorganize String: I started by explaining the brute-force approach to the problem. After that, they asked me to come up with an optimal solution. I was able to derive the correct optimal approach during the discussion, but I couldn’t implement the most efficient version within the interview timeframe. At first, the problem seemed difficult under pressure, but in hindsight, it turned out to be quite manageable. LeetCode 22: Generate Parentheses I understood the problem well and was able to explain the optimized backtracking solution. However, due to time constraints, they didn’t ask me to write the code.