Welcome to AlgoPrep, a curated C# repository focused on mastering data structures and algorithms through consistent problem-solving using LeetCode.
✨ Built for devs who want clarity, structure, and C#-specific practice for technical interviews or foundational mastery.
- 📦 Modular Problem Structure: Each problem lives in its own self-contained project
- 🧠 Pattern-Based Learning: Linked to algorithm patterns & LeetCode75 roadmap
- ⚙️ C# Focused: Clean, idiomatic
.NETcode with comments and optional complexity analysis - ✅ Progress-Oriented: Easy to track and extend with your own study path
algoprep/
├── docs/ # Docs, Custom Study Guides, Alogo Patterns
│ ├── linkedlists/ #Specific File to breadown patterns on Linked Lists
│ │ └── README.md
│ ├── CSharp_Algorithm_Patterns.md # Pattern explanations (e.g. Two Pointers, Sliding Window)
│ ├── 7_Day_Crash_Course.md # Only 7 Days to prep? This study guide gives you a crash course to refresh your DSA skills
├── leetcode75/ # LeetCode 75 Study Plan problems
├── Problems/ # Individual problems
│ ├── 001_TwoSum/
│ │ └── 001_TwoSum.csproj
│ ├── 002_AddTwoNumbers/
│ │ └── 002_AddTwoNumbers.csproj
│ └── ...
├── algoprep.sln # Solution file (includes all projects)
└── README.md # You're here!- .NET SDK
- IDE: Visual Studio or VS Code with C# extension
cd Problems/001_TwoSum
dotnet runYou can create a Tests/ folder using xUnit or NUnit for TDD-style learning.
When using dotnet new console -n ProblemName, the command does not automatically add the newly created project to your existing solution file (.sln).
-
Explicit Control: The .NET CLI is designed to give you explicit control. It assumes you might want to create projects independently of a solution or add them to a different solution later.
-
Location: When you run
dotnet new console -n ProblemName, it creates a new folder namedProblemNameand puts the.csprojfile inside it, along with theProgram.csand other project files. It doesn't automatically know where your solution file is located. -
Solution Files as Organizers: Solution files (
.sln) are organizational tools that help IDEs and thedotnetCLI understand relationships between multiple projects. Projects can exist without being part of any solution.
Navigate to your repository root and run:
dotnet new console -n ProblemName -o Problems/ProblemNameThis creates:
- A new folder
Problems/ProblemName - A C# project file
ProblemName.csprojinside that folder - A default
Program.csfile
After creating the project, you need to explicitly add it to your solution:
dotnet sln add Problems/ProblemName/ProblemName.csprojNow you can implement your solution in the Program.cs file or create additional classes as needed.
Build your solution:
dotnet buildRun your specific project:
dotnet run --project Problems/ProblemName/ProblemName.csproj# Initial setup (only needed once)
mkdir InterviewPrep
cd InterviewPrep
dotnet new sln -n InterviewProblems
# For each new problem
dotnet new console -n TwoSumProblem -o Problems/TwoSumProblem
dotnet sln add Problems/TwoSumProblem/TwoSumProblem.csproj
# Navigate to problem directory to work on it
cd Problems/TwoSumProblem
# Edit Program.cs...
# Or run the project from the solution root
cd ../..
dotnet run --project Problems/TwoSumProblem/TwoSumProblem.csprojWhen you open InterviewProblems.sln in Visual Studio or VS Code (with C# extension), you'll see all problems listed in the Solution Explorer, making it easy to navigate between different problem implementations.
This repo includes structured learning plans:
- Focused sequence of ~75 curated LeetCode problems.
- Learn by topic: Arrays, Hash Maps, Linked Lists, Trees, DP, etc.
- Annotated and explained in C# context.
- Strategy-focused guide across common patterns:
- Two Pointers
- Sliding Window
- DFS/BFS
- Dynamic Programming
- Greedy
- ...and more.
If you'd like to improve the repo or add new problems:
- Fork the repo
- Add your project in
/Problems/###_ShortName/ - Use C# and follow naming conventions
- Submit a pull request
- Code from scratch after understanding solutions
- Comment key decisions and complexities
- Talk through your approach like a mock interview
- Track time spent and review failures intentionally
“It’s not that I’m so smart, it’s just that I stay with problems longer.”
— Albert Einstein
Maintained by @gillisce
Feel free to open issues for questions, suggestions, or new patterns!
Happy coding! 💻