-
Notifications
You must be signed in to change notification settings - Fork 295
Add optimized C++ solution for Number Spiral (CSES 1071) — Hacktoberfest 2025 #688
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add optimized C++ solution for Number Spiral (CSES 1071) — Hacktoberfest 2025 #688
Conversation
💎 Code Quality Check Results
|
|
🎉 Welcome to Hacktoberfest 2025, @Aditya12604! 🎃 Thank you for your first contribution to our DSA repository! Here's what happens next: 🔍 Automatic Checks
📋 Next Steps🎯 Great job! Your code compiled successfully. Maintainers @Karanjot786 and @Pradeepsingh61 will review your PR soon. 🎁 What You Get
💡 Tips for Success
Welcome to the community! 🚀 |
🤖 Automated PR Status🔍 Code Validation✅ Passed - File naming and structure look good! 🧪 Compilation Tests✅ Passed - All code compiles successfully! 📋 Overall Status🎉 Ready for Review - Your PR has passed all automated checks! This comment was generated automatically. Checks will re-run when you push new commits. |
… Spiral (CSES 1071)
|
Hi maintainers! 👋 Please ignore or close this PR — I’ve opened a clean, updated version with only the intended file changes here: This old one accidentally included commits from my previous work. Thank you for understanding and reviewing the correct PR instead! |
Description
This PR adds a C++ solution for the CSES problem:
"Number Spiral" (Problem 1071)
Problem Link: https://cses.fi/problemset/task/1071/
Added full problem statement, explanation, time complexity, and test cases
Code is cleanly structured with descriptive comments and a self-contained main() for testing
Folder Structure
Placed under: CPP/patterns/Pattern/NumberSpiral_CSES1071.cpp
Highlights
O(1) time complexity
O(1) space complexity
Includes sample input and expected output
Readable and consistent variable naming
Matches repo’s contribution style
Test Cases
Includes two example test cases with expected outputs inside the file.
Hacktoberfest
This PR is made for Hacktoberfest 2025.