LeetCode Question · May 2022 · Los Angeles

Minimum number of swaps to make balanced parenthesis | Google | Meta

8 upvotes 1,337 views 2 replies

Question Details

Minimum number of swap to make balanced parenthesis. It is not necessary to swap the adjacent elements. Otherwise if not possible return -1. Example: 1. )()( ----> 1, swap first and...

Full Details

🔒

Unlock full leaked content

Full insider details, leaked discussions, and candidate experiences.

Get Premium →

Topics

Strings