Skip to content

A robust C++ solution for validating parentheses in strings. This project features a well-tested algorithm that handles different types of parentheses, including (), {}, and []. It is designed to cover a wide range of scenarios, from simple to complex nested structures, ensuring the correct ordering and pairing of parentheses.

Notifications You must be signed in to change notification settings

danieldotwav/Parentheses-Validation

Repository files navigation

Parentheses Validation

Screenshot 2023-12-30 132158

Project Overview

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 [].

Features

  • Efficient validation of parentheses.
  • Supports mixed types of parentheses.
  • Comprehensive test cases covering edge cases and typical scenarios.

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.

Prerequisites

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)

Installing

A step-by-step series of examples that tell you how to get a development environment running:

  1. 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.

  2. Navigate to the project directory:

    cd parentheses-validation
  3. Compile the source code (example using g++):

    g++ -o validation main.cpp
  4. Run the compiled program:

    ./validation

Running the Tests

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.

About

A robust C++ solution for validating parentheses in strings. This project features a well-tested algorithm that handles different types of parentheses, including (), {}, and []. It is designed to cover a wide range of scenarios, from simple to complex nested structures, ensuring the correct ordering and pairing of parentheses.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages