Skip to content

Parenthesis Checker Algorithm Implementation in Java using Stack

Notifications You must be signed in to change notification settings

xaenic/ParenthesisChecker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 

Repository files navigation

Parenthesis Checker

This repository contains an implementation of a Parenthesis Checker in Java. The Parenthesis Checker algorithm is used to validate the correctness of the arrangement of parenthesis characters in a given string.

Features

  • Java Implementation: The algorithm is implemented in Java, making it platform-independent and easily accessible.
  • Efficient Validation: The implementation efficiently checks the correctness of parenthesis arrangements in a string.
  • Educational Resource: This repository serves as a practical example for understanding string manipulation algorithms in Java.

Tags

#java #algorithm #string #validation #education

How to Use

To use this implementation, follow these steps:

  1. Clone the repository to your local machine using the following command:

    git clone <repository_url>
    
  2. Navigate to the directory containing the Java files.

  3. Compile the Java files using the Java compiler. For example:

    javac ParenthesisChecker.java
    
  4. Run the compiled Java program, passing the string containing parentheses to be checked as an argument. For example:

    java ParenthesisChecker "(a+b)-(c+d)"
    

Example

For example, if you run the program with the string "(a+b)-(c+d)", you should see the output:

Parentheses are balanced.

Contributions

Contributions to enhance the implementation or documentation are welcome. Please feel free to submit a pull request or open an issue if you encounter any problems or have suggestions for improvement.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Acknowledgements

Special thanks to all contributors who have helped to improve this implementation.

Releases

No releases published

Packages

No packages published

Languages