Skip to content
/ CSES-Solutions Public template

This repository contains clean and efficient solutions to the CSES Problem Set, implemented in C++. Great for practicing algorithms and preparing for competitive programming.

Notifications You must be signed in to change notification settings

mostafa-cse/CSES-Solutions

Repository files navigation

📘 CSES Problem Set Solutions

Welcome to the **CSES Problem Set Workbook Solutions Repository**! This repository contains structured, categorized, and well-documented solutions for problems from the [CSES Problem Set](https://cses.fi/problemset/), with a focus on the extended **Workbook** version curated by the community (e.g., Isun57, ilovesabnaj, etc.).

📚 About

The CSES Problem Set is a renowned collection of competitive programming problems covering a wide range of topics from basic loops to advanced graph theory and segment trees.

This repository is aimed at:

  • 🚀 Helping programmers practice algorithmic thinking.
  • 📈 Tracking workbook-style progress (e.g., 105 + 6 + 289 / 400).
  • 💡 Providing clean, commented C++ solutions for learning and reference.

📂 Folder Structure

Solutions are grouped by topic and named by problem title or ID. Each folder contains the solutions to CSES problems grouped by topic:


✅ Problem Coverage

🧠 This repository is actively being updated to cover all workbook problems across categories.

We aim to complete the following topics:

  1. Introductory Problems
  2. Sorting and Searching
  3. Dynamic Programming
  4. Graph Algorithms
  5. Tree Algorithms
  6. Range Queries
  7. Mathematics
  8. String Algorithms
  9. Geometry
  10. Advanced Techniques
  11. Sliding Window Problems
  12. Interactive Problems
  13. Bitwise Operations
  14. Construction Problems
  15. Advanced Graph Problems
  16. Counting Problems
  17. Additional Problems I
  18. Additional Problems II

🛠️ Tools & Language

  • All solutions are written in C++17 or later
  • Focus on:
    • Clean code 🧼
    • Efficient algorithms ⚡
    • Competitive programming practices ⌛

📌 Usage

You can use this repository to:

  • 📖 Learn how to solve standard problems step-by-step
  • 🧪 Benchmark your own solutions
  • 💼 Prepare for contests (e.g., ICPC, Codeforces, AtCoder, etc.)
  • 📚 Study topic-wise for interviews or academic coursework

🙌 Contribution

Pull requests and issue reports are welcome! Feel free to:

  • Suggest alternative solutions
  • Submit improved versions
  • Report bugs or typos

🔗 References


📄 License

This repository is licensed under the MIT License, so feel free to use and adapt it for personal or educational purposes.


🤝 Acknowledgements

  • Huge thanks to CSES.fi and contributors like Antti Laaksonen
  • Workbook format inspired by Isun57, ilovesabnaj, and the broader CP community

Happy Coding! 💻✨
“Practice is the best teacher.”