A C# .NET 10.0 project for practicing Data Structures and Algorithms (DSA) problems through automated code generation and comprehensive testing.
This project is a C# implementation inspired by ThePrimeagen's KataMachine, which he developed for his DSA course on Frontend Masters. KataMachine is a TypeScript/JavaScript project that provides automated code generation and testing for practicing data structures and algorithms.
- Automated Code Generation: Generate algorithm stub files with a single command
- Comprehensive Test Suite: Pre-written xUnit tests for all algorithms
- Modern C#: Built with .NET 10.0, implicit usings, and nullable reference types
- Code Coverage: Integrated Coverlet for test coverage reporting
- Code Formatting: Automated code formatting with
dotnet format
- .NET 10.0 SDK
- Git (for cloning the repository)
git clone <repository-url>
cd KataEngine# Build the entire solution
dotnet build
# Clean and rebuild
dotnet clean && dotnet build
# Build for release
dotnet build --configuration ReleaseGenerate the initial algorithm stub files:
dotnet run --project KataEngine generateThis creates algorithm implementations in KataEngine/Dsa/day{N}/ directories with method stubs that throw NotImplementedException.
If for some weird reason, you want to start all over:
dotnet run --project KataEngine clear-
Generate Stubs (if not already done):
dotnet run --project KataEngine generate
-
Implement Algorithms: Edit the generated files in
KataEngine/Dsa/day{N}/to implement the algorithms. -
Run Tests: Test your implementations:
# Run all tests dotnet test # Run tests for a specific algorithm (recommended for development) dotnet test --filter "ClassName=BinarySearchListTest" dotnet test --filter "ClassName=QuickSortTest"
The project includes stubs and tests for various DSA topics:
- Linear Search
- Binary Search
- Bubble Sort
- Insertion Sort
- Quick Sort
- Merge Sort
- Stack
- Queue
- Singly Linked List
- Doubly Linked List
- Ring Buffer
- Trie
- LRU Cache
- Min Heap
- Map (Hash Table)
- Depth-First Search (DFS)
- Dijkstra's Algorithm
- Binary Tree Traversals (Pre-order, In-order, Post-order)
- Binary Tree Breadth-First Search
- DFS on Binary Search Tree
- Binary Tree Comparison
- Two Crystal Balls Problem
- Maze Solver