Atlassian interview question

Balanced braces - LC. 20