Skip to content

Commit 309bc19

Browse files
committed
Initial commit
0 parents  commit 309bc19

File tree

5 files changed

+220
-0
lines changed

5 files changed

+220
-0
lines changed

.github/workflows/ci.yml

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
name: CI Workflow
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
- "feature/*"
8+
pull_request:
9+
branches:
10+
- main
11+
12+
jobs:
13+
build:
14+
runs-on: ubuntu-latest
15+
16+
steps:
17+
- name: Checkout code
18+
uses: actions/checkout@v3
19+
20+
- name: Set up Python
21+
if: contains(github.event.head_commit.message, 'python')
22+
uses: actions/setup-python@v4
23+
with:
24+
python-version: "3.8"
25+
26+
- name: Install dependencies (Python)
27+
if: contains(github.event.head_commit.message, 'python')
28+
run: |
29+
python -m pip install --upgrade pip
30+
pip install -r requirements.txt
31+
32+
- name: Run tests (Python)
33+
if: contains(github.event.head_commit.message, 'python')
34+
run: |
35+
pytest
36+
37+
- name: Set up Node.js
38+
if: contains(github.event.head_commit.message, 'node')
39+
uses: actions/setup-node@v3
40+
with:
41+
node-version: "14"
42+
43+
- name: Install dependencies (Node.js)
44+
if: contains(github.event.head_commit.message, 'node')
45+
run: |
46+
npm install
47+
48+
- name: Run tests (Node.js)
49+
if: contains(github.event.head_commit.message, 'node')
50+
run: |
51+
npm test
52+
53+
- name: Build project
54+
run: |
55+
# Add build steps here, if applicable
56+
echo "Building the project..."
57+
58+
- name: Deploy
59+
if: github.ref == 'refs/heads/main' && success()
60+
run: |
61+
# Add deployment steps here
62+
echo "Deploying the project..."

.gitignore

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
# Node.js
2+
node_modules/
3+
npm-debug.log
4+
yarn-debug.log
5+
yarn-error.log
6+
7+
# Python
8+
__pycache__/
9+
*.py[cod]
10+
*.pyo
11+
*.pyd
12+
*.sqlite3
13+
*.env
14+
15+
# Java
16+
*.class
17+
*.log
18+
*.jar
19+
*.war
20+
*.ear
21+
target/
22+
*.iml
23+
*.project
24+
*.classpath
25+
26+
# C/C++
27+
*.o
28+
*.obj
29+
*.out
30+
*.exe
31+
*.dll
32+
*.lib
33+
*.a
34+
*.dylib
35+
36+
# JavaScript
37+
*.js.map
38+
*.min.js
39+
*.bundle.js
40+
dist/
41+
build/
42+
43+
# IDEs and Editors
44+
.vscode/
45+
.idea/
46+
*.suo
47+
*.user
48+
*.swp
49+
*.sublime-workspace
50+
*.sublime-project
51+
52+
# OS-specific
53+
.DS_Store
54+
Thumbs.db
55+
desktop.ini
56+
57+
# Logs
58+
*.log
59+
60+
# Build directories
61+
build/
62+
dist/
63+
out/
64+
65+
# Temporary files
66+
*.tmp
67+
*.bak
68+
*.swp
69+
70+
# Environment files
71+
.env
72+
.env.*

CONTRIBUTING.md

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
# Contributing to Coding Problems Repository
2+
3+
Thank you for your interest in contributing to the Coding Problems Repository! We welcome contributions from everyone. To help us maintain a high standard of quality and ensure a smooth contribution process, please follow the guidelines below.
4+
5+
## How to Contribute
6+
7+
### 1. Adding a New Problem
8+
9+
1. **Find a Unique Problem**: Ensure that the problem you are proposing is unique and has not already been added to the `problems/` directory.
10+
2. **Create a Problem Statement**: Write a clear and concise problem statement. Include any constraints, examples, and expected input/output formats.
11+
3. **Add the Problem**: Place your problem statement in a new file within the `problems/` directory. Name the file in a descriptive and concise manner, e.g., `problem-title.md`.
12+
13+
### 2. Providing Solutions
14+
15+
1. **Develop Solutions**: Write solutions for the problem in multiple programming languages, including C, C++, Java, JavaScript, and Python, if applicable.
16+
2. **Organize Solutions**: Create a directory within `solutions/` for your problem if it doesn't already exist. Name the directory to correspond with the problem statement.
17+
3. **Add Solution Files**: Place your solution files in the relevant language subdirectories within the `solutions/` directory.
18+
19+
### 3. Follow Coding Standards
20+
21+
- **Code Style**: Adhere to the style guidelines for each language. For instance, follow PEP 8 for Python, Google Java Style Guide for Java, and so on.
22+
- **Comments and Documentation**: Include comments and documentation in your code to explain logic and help others understand your solution.
23+
- **Testing**: Ensure your solutions are thoroughly tested and provide sample inputs and outputs.
24+
25+
### 4. Submit Your Contribution
26+
27+
1. **Fork the Repository**: Create a fork of this repository on GitHub.
28+
2. **Create a Branch**: Create a new branch for your changes, e.g., `add-new-problem` or `update-solutions`.
29+
3. **Commit Your Changes**: Commit your changes with clear, descriptive commit messages.
30+
4. **Open a Pull Request**: Submit a pull request (PR) from your branch to the main repository. Provide a brief description of the changes and the problem you addressed.
31+
32+
### 5. Review Process
33+
34+
- **Review**: Your PR will be reviewed by the repository maintainers. They might request changes or provide feedback.
35+
- **Merge**: Once approved, your contribution will be merged into the main branch.
36+
37+
## Additional Information
38+
39+
- **Issues**: If you encounter any issues or have suggestions for improvements, please open an issue in the repository.
40+
- **Questions**: For any questions or further clarification, feel free to reach out through the repository's issues or [your email or GitHub profile link].
41+
42+
Thank you for contributing and helping to make this repository a valuable resource for the coding community!

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2024 Ravikant Patidar
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# Coding Problems Repository
2+
3+
This repository contains a collection of coding problems and their solutions in multiple programming languages.
4+
5+
## Structure
6+
7+
- `problems/` - Contains problem statements.
8+
- `solutions/` - Contains solutions for each problem in C, C++, Java, JavaScript and Python.
9+
10+
## How to Use
11+
12+
1. Browse the `problems/` directory to find a problem of interest.
13+
2. Check the corresponding solutions in the `solutions/` directory.
14+
15+
## How to Contribute
16+
17+
1. Add a new problem statement to the `problems/` directory.
18+
2. Provide solutions in the `solutions/` directory.
19+
3. Follow the guidelines in `CONTRIBUTING.md`.
20+
21+
## Contact
22+
23+
For questions or suggestions, please contact [your email or GitHub profile link].

0 commit comments

Comments
 (0)