This directory contains solutions to the 19 introductory problems from the CSES Problem Set. These problems are designed to help beginners learn basic programming concepts and algorithms.
| # | Problem Name | Difficulty | Topic | Solution |
|---|---|---|---|---|
| 1 | Weird Algorithm | ★☆☆☆☆ | Implementation | View Solution |
| 2 | Missing Number | ★☆☆☆☆ | Array Manipulation | View Solution |
| 3 | Repetitions | ★☆☆☆☆ | String Processing | View Solution |
| 4 | Increasing Array | ★☆☆☆☆ | Greedy Algorithms | View Solution |
| 5 | Permutations | ★☆☆☆☆ | Combinatorics | View Solution |
| 6 | Number Spiral | ★★☆☆☆ | Pattern Recognition | View Solution |
| 7 | Two Knights | ★★☆☆☆ | Combinatorics | View Solution |
| 8 | Two Sets | ★★☆☆☆ | Greedy Algorithms | View Solution |
| 9 | Bit Strings | ★☆☆☆☆ | Combinatorics | View Solution |
| 10 | Trailing Zeros | ★★☆☆☆ | Mathematics | View Solution |
| 11 | Coin Piles | ★★☆☆☆ | Game Theory | View Solution |
| 12 | Palindrome Reorder | ★★☆☆☆ | String Manipulation | View Solution |
| 13 | Gray Code | ★★☆☆☆ | Bit Manipulation | View Solution |
| 14 | Tower of Hanoi | ★★☆☆☆ | Recursion | View Solution |
| 15 | Creating Strings | ★★☆☆☆ | Permutations | View Solution |
| 16 | Apple Division | ★★★☆☆ | Subset Sum | View Solution |
| 17 | Chessboard and Queens | ★★★☆☆ | Backtracking | View Solution |
| 18 | Digit Queries | ★★★☆☆ | Mathematics | View Solution |
| 19 | Grid Paths | ★★★☆☆ | Dynamic Programming | View Solution |
After solving these problems, you should be comfortable with:
- Basic input/output operations
- Array and string manipulation
- Simple mathematical concepts
- Basic greedy algorithms
- Recursion fundamentals
- Pattern recognition
- Combinatorics basics
- Start Simple: Begin with the 1-star problems
- Read Carefully: Understand the problem statement completely
- Test Cases: Always test with edge cases
- Time Complexity: Consider the efficiency of your solution
- Practice: Solve problems multiple times to reinforce concepts
Happy Coding! 🎉