Welcome to our collection of programming challenges! Here you'll find a variety of problems to help you improve your coding skills. Each problem is carefully designed to test different aspects of programming and algorithmic thinking.
Test your string manipulation skills by determining if two words are anagrams of each other.
Key Concepts:
- String manipulation
- Character counting
- Hash tables
- Time complexity optimization
Example:
> is_anagram("listen", "silent")
True
> is_anagram("hello", "world")
FalsePractice string manipulation by determining if a text reads the same forwards and backwards.
Key Concepts:
- String manipulation
- Pattern matching
- Input validation
- Handling special cases
Example:
> palindrome("kayak")
True
> palindrome("A man, a plan, a canal: Panama!")
True
> palindrome("hello")
FalsePractice optimization techniques with this classic mathematical sequence using an iterative approach.
Key Concepts:
- Iterative implementation
- Space optimization
- Time complexity analysis
- Performance constraints
- Input validation
Example:
> fibonacci(0)
0
> fibonacci(6)
8
> fibonacci(10)
55
> fibonacci(20)
6765A classic optimization problem that tests your understanding of dynamic programming.
Key Concepts:
- Dynamic programming
- Optimization
- Array manipulation
- Decision making with constraints
Example:
> knapsack(weight_capacity=50, weights=[10,20,30], values=[60,100,120])
220A challenging chess puzzle that tests your skills in backtracking and algorithmic thinking.
Key Concepts:
- Backtracking algorithms
- State space search
- Constraint satisfaction
- Board game logic
Example:
> nqueens(n=4)
[[1, 3, 0, 2]] # One possible solution for 4x4 board
> nqueens(n=8)
[[0, 4, 7, 5, 2, 6, 1, 3]] # One possible solution for 8x8 board-
Read Carefully:
- Understand the problem statement completely
- Pay attention to constraints and edge cases
- Look at the examples provided
-
Plan Before Coding:
- Break down the problem into smaller steps
- Think about possible approaches
- Consider time and space complexity
-
Testing:
- Test your solution with the provided examples
- Try edge cases
- Consider performance implications
- Choose a problem based on your current skill level
- Read the problem description thoroughly
- Try to solve it on your own first
- Test your solution using the provided test cases
- Optimize your solution if needed
- 🟢 Easy: Good for beginners and warm-up
- 🟡 Medium: Requires good problem-solving skills
- 🔴 Hard: Challenging problems for experienced programmers
Have an interesting problem to add? We welcome contributions! Please ensure your problem submission includes:
- Clear problem statement
- Example inputs and outputs
- Test cases
- Solution approach (optional)
- Difficulty level
We recommend solving problems in this order:
- Start with String problems (Anagram, Palindrome)
- Progress to sequence problems (Fibonacci)
- Move to Dynamic Programming (Knapsack)
- Tackle complex problems (N Queens)
- Progress to more complex problems as they are added
We're constantly adding new problems. Here are some categories we're working on:
- Graph Algorithms
- Tree Traversal
- Sorting and Searching
- Bit Manipulation
Stay tuned for more challenges!