This repository contains my solutions to LeetCode problems, organized by difficulty and implemented in Go with comprehensive testing.
problems/
: Solutions organized by difficulty (easy/medium/hard)cmd/test-runner/
: Command-line tool to run specific testspkg/common/
: Common data structures and utilities.devcontainer/
: Docker development environment setup
# Run all tests
make test
# Run tests for a specific problem
make test-problem PROBLEM=two-sum
# Run with verbose output
make test-verbose
# Run with coverage
make test-cover
# Run all tests for two-sum problem
go run cmd/test-runner/main.go two-sum
# Run specific test case
go run cmd/test-runner/main.go two-sum TestTwoSumHashMap
- Open the problem file you want to debug
- Set breakpoints in your solution code
- Use
Ctrl+Shift+P
→ "Debug: Start Debugging" - Choose "Debug Specific Problem Test"
- Enter the problem path and test name when prompted
This project uses a devcontainer for consistent development environment:
- Install Docker and VSCode with Dev Containers extension
- Open the project in VSCode
- When prompted, click "Reopen in Container"
make new-problem DIFFICULTY=<easy|medium|hard|extra> PROBLEM=<problem name>
where extra
is for non leetcode problems.