ghostmkg / programming-language

You write code in any programming language you want. And push the code.
33 stars 79 forks source link

Create balanced_brackets.cpp #93

Closed TanishaBansal101 closed 1 day ago

TanishaBansal101 commented 1 day ago

What does this PR do?

This C++ program checks whether a given string of brackets (parentheses, curly braces, and square brackets) is balanced. A string is considered balanced if:

Every opening bracket has a corresponding closing bracket of the same type. Brackets are properly nested and closed in the correct order. The program utilizes a stack data structure to ensure that the brackets are balanced efficiently. It supports three types of brackets:

() {} []

Test Plan

(Write your test plan here. If you changed any code, please provide us with clear instructions on how you verified your changes work.)

Related PRs and Issues

(If this PR is related to any other PR or resolves any issue or related to any issue link all related PR and issues here.)

Have you read the Contributing Guidelines on issues?

(Yes)