You can contribute to this repo in any of the following ways
-
If you are selecting a problem from a website like hackerrank, codechef etc
- Add it to the respective folder (eg: hackerrank_problems; if it doesn't exist, create it)
- Make a folder with the name as name of the problem given
- Should have 2 files:
problem.mdandsolution - Add the link to the problem in
problem.mdfile - Add your solution in any language
-
If you are submitting a new problem
- Add it to misc folder (if it doesn't exist, create it)
- Make a folder with name as name of the problem
- Should have 2 files:
problem.mdandsolution - In
problem.md, provide detailed explanation of problem statement and constraints with at least 2 testcases and it's explanation - Add your solution in any language
- You can contribute your solutions to any problem
- Add it as a new file in the format solution_number eg: (
solution2) in the respective problem folder
- You can improve the readme and contributing documentation
The idea is to collect different solutions/logic in different languages to some of the popular CP questions.
Please add the Logic of solving the problem either in the form of comments along with the code or as logic at the beginning of the code.
More emphasis is given on understanding the logic used to get the solution rather than the code itself. Hence simply copy-pasting code is not encouraged.
Solutions must also be properly indented.
Keep the above points in mind before sending a Pull Request.
Happy contributing :)