Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 

README.md

💻 Competitive Programming - Sample Programs

This folder contains competitive programming solutions organized by programming language. Each solution includes problem statement, approach explanation, and optimized code.


📁 Folder Structure

Programs/
├── C++/           # C++ solutions
├── Python/        # Python solutions
└── Java/          # Java solutions

🚀 Getting Started

Choose Your Language

Pick the language folder you're most comfortable with or want to learn:

  • C++ - Most popular in competitive programming (fast execution)
  • Python - Great for quick prototyping and readable code
  • Java - Good balance of speed and OOP features

Adding Your Solutions

  1. Navigate to your language folder (C++, Python, or Java)
  2. Create a new file with a descriptive name (e.g., BinarySearch.cpp)
  3. Include problem statement, approach, complexity analysis
  4. Add test cases to verify your solution
  5. Submit a pull request

📚 Problems by Language

C++ Programs

  1. Watermelon (Watermelon.cpp) - Easy | Codeforces

  2. Team Olympiad (TeamOlympiad.cpp) - Easy | Codeforces

  3. Next Round (NextRound.cpp) - Easy | Codeforces

  4. ATM (ATM.cpp) - Easy | CodeChef

  5. Enormous Input Test (EnormousInput.cpp) - Easy | CodeChef

  6. Turbo Sort (TurboSort.cpp) - Easy | CodeChef

  7. Sieve of Eranthoses (sieveoferanthoses.cpp)

Python Programs

  1. Watermelon (Watermelon.py) - Easy | Codeforces

  2. Next Round (NextRound.py) - Easy | Codeforces

  3. ATM (ATM.py) - Easy | CodeChef

  4. Turbo Sort (TurboSort.py) - Easy | CodeChef

Java Programs

  1. Watermelon (Watermelon.java) - Easy | Codeforces

  2. Next Round (NextRound.java) - Easy | Codeforces

  3. ATM (ATM.java) - Easy | CodeChef

  4. Turbo Sort (TurboSort.java) - Easy | CodeChef


🎯 Contribution Guidelines

Accepted Platforms

We accept problems from these competitive programming platforms:

What to Include in Your Solution

  1. Header Comment Block

    /*
    Problem: [Problem Name]
    Platform: [Codeforces/CodeChef/LeetCode]
    Problem Code: [Problem Code/Number]
    Difficulty: [Easy/Medium/Hard]
    Link: [Direct Problem URL]
    
    Problem Statement:
    [Brief description]
    
    Example:
    Input: [sample input]
    Output: [sample output]
    
    Approach:
    [Your approach]
    
    Time Complexity: O(?)
    Space Complexity: O(?)
    
    Contributor: [Your GitHub Username]
    */
  2. Clean, Well-Commented Code

    • Use meaningful variable names
    • Add comments for complex logic
    • Follow language-specific conventions
  3. Test Cases

    • Include multiple test cases in main/test function
    • Show expected output in comments
  4. Complexity Analysis

    • Explain time and space complexity
    • Justify your approach

Naming Conventions

  • Use descriptive filenames: ProblemName.extension
  • Examples: TwoSum.cpp, BinarySearch.py, MergeSort.java
  • Use PascalCase for problem names

🏆 Difficulty Levels

  • Easy: Basic data structures, simple algorithms
  • Medium: Advanced DS, dynamic programming, graphs
  • Hard: Complex algorithms, optimization techniques

💡 Tips for Contributors

  1. Start Simple: Begin with easy problems to understand the format
  2. Optimize: Always try to improve time/space complexity
  3. Test Thoroughly: Include edge cases in your tests
  4. Document Well: Clear explanations help others learn
  5. Follow Style: Match the coding style of existing solutions

�️ Contributor Recognition

Your contributions matter!

After your PR is accepted and merged:

  • ✅ Your GitHub profile will be automatically added to our Contributors section
  • ✅ Your contribution badge will appear on the repository
  • ✅ You'll be featured in the domain leaderboard
  • ✅ Multiple contributions earn you a spot in the Hall of Fame

Note: Badges and contributor recognition update automatically within 24 hours of PR merge. Make sure your commits are associated with your GitHub account!


� Learning Resources


🤝 Need Help?

  • Check existing solutions for reference format
  • Read the main CONTRIBUTING.md
  • Open an issue if you have questions
  • Join discussions in pull requests

Happy Coding! 🚀