Question

Write a function to check if brackets are balanced?

Login to Submit

Examples

Input: "()"
Output: true

Input: "())))"
Output: false

Input: "()()()()"
Output: true