Question DSA-STK-0039
EasyWhat is the time complexity of checking whether a string of n brackets is balanced?
- A.
O(n)
- B.
O(1)
- C.
Sign up free to see the answer and a step-by-step explanation.
Popular companies
Prepare company by company
Hiring pattern, syllabus, past questions and mocks for each company.
All companiesPractice by subject
Stacks question
What is the time complexity of checking whether a string of n brackets is balanced?
O(n)
O(1)
Sign up free to see the answer and a step-by-step explanation.
O(n²)
O(log n)