This repository contains a collection of solved programming problems from Hackerrank, implemented in the C++ programming language. Each problem is solved with the goal of providing concise and efficient solutions.
To use the code in this repository, follow the steps below:
- Clone the repository to your local machine using the following command:
git clone git@github.com:geekyharsh05/Hackerrank-CPP-Problems.git
-
Ensure that you have a C++ compiler installed on your machine.
-
Navigate to the cloned repository directory:
cd Hackerrank-CPP-Problems
Each problem is organized into a separate directory and contains the problem statement, the C++ source code solution, and a sample input/output file.
To run a specific problem, navigate to its directory and compile the C++ source code using your preferred C++ compiler. For example, to compile problem.cpp
, use the following command:
g++ problem.cpp -o problem
After successful compilation, you can run the executable file (e.g., problem.exe
on Windows or ./problem
on Linux/Mac) to execute the code and see the output.
./problem
Contributions to this repository are welcome! If you want to add solutions for new Hackerrank problems or improve existing ones, please follow these guidelines:
-
Fork the repository.
-
Create a new branch for your feature or bug fix.
-
Implement your changes and ensure that your code adheres to the C++ coding style.
-
Add new problem solutions in their respective directories, following the existing structure.
-
Test your code thoroughly to ensure it works correctly.
-
Commit your changes and push your branch to your forked repository.
-
Submit a pull request to the main repository, providing a clear description of your changes.
The code in this repository is licensed under the MIT License. Feel free to use, modify, and distribute the code for personal and commercial purposes.