Veeva Systems interview question

Leetcode question to check paired brackets in an array