This project implements a C++ function to validate a string of parentheses, ensuring each opening parenthesis has a corresponding and properly placed closing parenthesis. The implementation handles parentheses of types ()
, {}
, and []
.
- Efficient validation of parentheses.
- Supports mixed types of parentheses.
- Comprehensive test cases covering edge cases and typical scenarios.
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.
What things you need to install the software and how to install them:
- C++ compiler (e.g., GCC, Clang, MSVC)
- Git (optional for cloning the repository)
A step-by-step series of examples that tell you how to get a development environment running:
-
Clone the repository (if you have Git installed):
git clone https://github.com/danieldotwav/parentheses-validation.git
Or download the source code as a zip file.
-
Navigate to the project directory:
cd parentheses-validation
-
Compile the source code (example using g++):
g++ -o validation main.cpp
-
Run the compiled program:
./validation
The test suite can be run to validate the correctness of the algorithm. Each test case is labeled and demonstrates different scenarios, including edge cases.
Run the program as described in the 'Installing' section. The output will show each test case's result.