A comprehensive collection of algorithmic coding problems with test cases and boilerplate code in multiple programming languages.
Each problem is organized in its own directory with the following structure:
problem-name/
├── Problem.md # Problem statement and examples
├── Structure.md # Input/output specifications
├── boilerplate/ # Basic function templates
│ ├── function.java
│ └── function.js
├── boilerplate-full/ # Complete function implementations
│ ├── function.java
│ └── function.js
└── tests/ # Test cases
├── inputs/ # Input files (0.txt to 99.txt)
└── outputs/ # Expected output files (0.txt to 99.txt)
| Problem | Description | Difficulty |
|---|---|---|
| anagram-check | Check if two strings are anagrams | Easy |
| count-vowels | Count vowels in a string | Easy |
| factorial | Calculate factorial of a number | Easy |
| fibonacci | Generate Fibonacci sequence | Easy |
| find-median | Find median of an array | Medium |
| gcd-of-two-numbers | Greatest Common Divisor | Easy |
| max-element | Find maximum element in array | Easy |
| palindrome-check | Check if string is palindrome | Easy |
| reverse-string | Reverse a string | Easy |
| sort-array | Sort an array | Easy |
| two-sum | Find two numbers that sum to target | Easy |
| valid-parentheses | Check balanced parentheses | Easy |
- Choose a problem: Browse the available problems and select one to solve
- Read the problem: Check
Problem.mdfor problem statement and examples - Understand structure: Review
Structure.mdfor input/output specifications - Start coding: Use templates from
boilerplate/directory - Test your solution: Validate against test cases in
tests/directory
Contains the problem statement, examples, and constraints.
Defines the function signature and data types following this format:
- Problem Name
- Function Name
- Input Structure (with field types)
- Output Structure (with return type)
Each problem includes 100 test cases (0.txt to 99.txt) with corresponding expected outputs.
- Java: Complete with proper data types and collections
- JavaScript: Simplified type system with arrays and basic types
Refer to Rules.md for detailed guidelines on:
- Creating Structure.md files
- Supported data types for each language
- Input/output formatting conventions
- Function naming conventions
- Navigate to any problem directory
- Read the problem statement in
Problem.md - Check the function signature in
Structure.md - Implement your solution using the boilerplate code
- Test against the provided test cases
- Compare with the full implementation if needed
Each problem comes with comprehensive test cases:
- Input files: Located in
tests/inputs/ - Output files: Located in
tests/outputs/ - Coverage: 100 test cases per problem
Beginners: Start with basic problems like reverse-string, factorial, palindrome-check
Intermediate: Progress to fibonacci, two-sum, find-median
Advanced: Challenge yourself with more complex algorithms and data structures
Happy coding! 🎉