Thank you for your interest in contributing new challenges to this repository! This guide will help you create well-structured, testable programming challenges that provide value to the community.
To contribute a new challenge, you'll need to create:
- A challenge folder with a descriptive name
- A detailed README explaining the challenge
- Test files/suites to validate solutions
- A GitHub Actions workflow for automated testing and scoring
- Create a folder with a short, descriptive name using lowercase letters and underscores
- Examples:
fibonacci_sequence,binary_search,merge_sort,palindrome_checker - Place your folder in the appropriate language directory (
python/,cpp/, etc.)
Your README must include the following sections:
# Challenge Name
## 🎯 Description
Clear, concise description of what the challenge is about.
## 🔍 Task
Detailed explanation of what needs to be implemented, including:
- Function/class names (be specific!)
- Input parameters and their types
- Expected return values and types
- Any special requirements or constraints
## 📋 Requirements
- Language version requirements
- Coding standards to follow
- Any specific libraries or frameworks to use/avoid
## 🧪 Test Cases
List all test cases that solutions must pass:
- Basic functionality tests
- Edge cases
- Error handling scenarios
- Performance requirements (if applicable)- Provide a basic template or starter file
- Include function signatures, class definitions, or structure
- Add helpful comments for guidance
Create comprehensive test suites that:
- Test all specified functionality
- Cover edge cases and error conditions
- Provide clear, descriptive test names
- Use appropriate testing frameworks for the language
we use GoogleTest for C++ & Unittest for python to avoid having to pip install
- For C++: Include
CMakeLists.txt - For Python: Include
requirements.txtif external packages are needed - For other languages: Include appropriate build/dependency files but all must be contained within the named folder of the challenge.
Be specific and consistent with naming requirements:
Python:
def function_name(param1: type, param2: type) -> return_type:
"""Clear docstring explaining the function"""
passC++:
// In header file
int functionName(int param1, const std::string& param2);
// In implementation
int functionName(int param1, const std::string& param2) {
// Implementation
}- Python:
solution.py,test_main.py - C++:
solution.cpp,solution.h,test.cpp - README: Always
README.md
Create a workflow file in .github/workflows/ with the naming pattern:
{language}_{challenge_folder_name}_ci.yaml
Examples:
python_fibonacci_sequence_ci.yamlcpp_binary_search_ci.yaml
Your workflow must:
-
Trigger on appropriate paths:
on: push: paths: - 'language/challenge_folder/**'
-
Include a test job that builds and runs your tests
-
Include a points-system job that runs after successful tests
-
Use the exact same secrets pattern as existing workflows:
- name: Check secrets and increment points shell: bash run: | if [[ -n "${{ secrets.GKSS_LEADERBOARD_API_URL }}" && -n "${{ secrets.GKSS_LEADERBOARD_API_KEY }}" ]]; then echo "Incrementing points..." curl -X POST ${{ secrets.GKSS_LEADERBOARD_API_URL }} \ -H "x-gkssunisa-api-key: ${{ secrets.GKSS_LEADERBOARD_API_KEY }}" \ -H "Content-Type: application/json" \ -d '{"message": "i did it! ${{ github.actor }}"}' else echo "Skipping points increment - required secrets not found" exit 1 fi
⚠️ Important: The secrets access pattern must match exactly as shown above. This is required for the leaderboard system to function properly.
Use the TEMPLATE_ACTION_WORKFLOW.yaml file in the .github/ folder as a starting point for your workflow. This template includes:
- Detailed comments explaining each section
- Examples for Python, C++, JavaScript, and Java
- The exact secrets pattern required for the points system
- A comprehensive customization checklist
Replace placeholder text like LANGUAGE and CHALLENGE_FOLDER with your actual values.
Before submitting your challenge, ensure:
- Folder has a clear, descriptive name
- README includes all required sections
- Function/class names are clearly specified
- Test suite covers all requirements and edge cases
- Tests pass locally
- GitHub Actions workflow is properly configured
- Workflow file name follows the naming convention
- Secrets are accessed using the exact required pattern
- Challenge difficulty is appropriate for the target audience
Be as informtive and keep the quality of challenges fair
- Beginner: Basic programming concepts, simple algorithms
- Intermediate: Data structures, algorithm optimization, error handling
- Advanced: Complex algorithms, performance optimization, system design
- Clone this repo directly!
This is because we want to avoid pushing solutions into the base repo. You work on challenges in your fork and submit new challenge directly to the base repo.
- Create a new branch with for your new challenge.
- Create your challenge following the structure above
- Test your workflow locally (if possible)
- Submit a Pull Request with:
- Clear description of the challenge
- Difficulty level
- Any special requirements or dependencies
- Check existing challenges for examples
- Review the template workflow file
- Examine the current challenge structures
- Reach out in the discussions if your have questions.
Your contributions help make this repository a valuable learning resource for developers of all skill levels. We appreciate your effort in creating well-structured, educational challenges!
Happy coding! 🚀