Intelliwings interview question

They asked balanced parenthesis question same as on leetcode .