Quick links: Discussions | Issues | Pull Requests
A standalone algorithm coding practice application that works 100% offline. No local development environment required — just download, install, and start practicing. Supports JavaScript, TypeScript, and Python with WASM-based browser-side code execution.
The desktop application provides the best experience with zero environment setup required. Simply download and run.
| Platform | Download |
|---|---|
| macOS (Apple Silicon) | Algorithm-Practice-*-macOS-arm64.dmg |
| macOS (Intel) | Algorithm-Practice-*-macOS-x64.dmg |
| Windows (Installer) | Algorithm-Practice-*-Windows-Setup.exe |
| Windows (Portable) | Algorithm-Practice-*-Windows-Portable.exe |
| Linux (AppImage) | Algorithm-Practice-*-Linux.AppImage |
| Linux (Debian/Ubuntu) | Algorithm-Practice-*-Linux.deb |
| Linux (Fedora/RHEL) | Algorithm-Practice-*-Linux.rpm |
macOS Users: If you encounter "App is damaged and can't be opened", run in Terminal:
xattr -cr "/Applications/Algorithm Practice.app"For developers who prefer running from source, see Development Setup below.
- Standalone Application: No Node.js, Python, or any development environment required
- Complete Offline Support: Works without internet after installation
- Built-in Problem Library: 10+ classic algorithm problems included
- AI Problem Generator: Generate custom problems using various AI providers
- WASM Code Execution: Browser-side execution for JavaScript, TypeScript, and Python
- Monaco Code Editor: VS Code-like editing experience with syntax highlighting and autocomplete
- Instant Testing: Run tests immediately with detailed results and execution time tracking
- Cross-platform: Windows, macOS, and Linux supported
| Language | Status | Implementation |
|---|---|---|
| JavaScript | Supported | Native browser execution |
| TypeScript | Supported | TypeScript compiler transpilation |
| Python | Supported | Pyodide (CPython WASM) |
All code execution happens in the browser using WebAssembly. No server-side execution required.
- Custom Problem Creation: Describe what you want to practice in natural language
- Complete Solutions: Each problem includes working reference solutions
- Comprehensive Testing: Auto-generated test cases including edge cases
- Instant Integration: Problems automatically added to your local library
- Browse Problems: View the problem list with difficulty and tags
- Select a Problem: Click on any problem to open the detail page
- Choose Language: Select JavaScript, TypeScript, or Python
- Write Solution: Use the Monaco editor with full IDE features
- Run Tests: Click "Submit & Run Tests" to execute your code
- View Results: See detailed test results with execution time
- Access Generator: Click "AI Generator" on the homepage
- Describe Requirements: Enter what type of problem you want
- Generate: AI creates a complete problem with test cases and solutions
- Practice: Generated problem is automatically available in your library
Access the settings page to configure AI providers:
- Desktop Mode: Via "Settings" button or application menu
- Web Mode: Navigate to
/settings(e.g., http://localhost:3000/settings)
Supported AI providers:
- DeepSeek
- OpenAI
- Qwen (Alibaba Cloud)
- Claude (Anthropic)
- Ollama (Local)
Configuration is saved to ~/.offline-leet-practice/config.json in desktop mode. See AI_PROVIDER_GUIDE.md for detailed configuration.
- Via UI: Use the "Add Problem" page in the application
- JSON Import: Upload or paste problem data in JSON format
- Direct Edit: Modify
public/problems.jsonfor immediate changes
See MODIFY-PROBLEMS-GUIDE.md for the complete guide.
For developers who want to run from source or contribute to the project.
- Node.js 18+ (Download)
- npm 8+
Windows:
start-local.batmacOS / Linux:
chmod +x start-local.sh
./start-local.shManual Setup:
git clone https://github.com/zxypro1/OfflineLeetPractice.git
cd OfflineLeetPractice
npm install
npm run build
npm startThen open http://localhost:3000 in your browser.
# macOS
npm run dist:mac
# Windows
npm run dist:win
# Linux
npm run dist:linux
# All platforms
npm run dist:allSee DESKTOP-APP-GUIDE.md for detailed build instructions.
- Frontend: React 18, Next.js 13, TypeScript
- UI Framework: Mantine v7
- Code Editor: Monaco Editor
- Code Execution: WebAssembly
- JavaScript: Native browser
Functionconstructor - TypeScript: TypeScript compiler (CDN)
- Python: Pyodide (CPython compiled to WASM)
- JavaScript: Native browser
- Desktop: Electron
OfflineLeetPractice/
├── pages/ # Next.js pages and API routes
│ ├── api/
│ │ ├── problems.ts # Problem data API
│ │ ├── generate-problem.ts
│ │ └── add-problem.ts
│ ├── problems/[id].tsx # Problem detail page
│ ├── generator.tsx # AI Generator page
│ └── index.tsx # Homepage
├── src/
│ ├── components/ # React components
│ └── hooks/
│ └── useWasmExecutor.ts
├── public/
│ └── problems.json # Problem database
├── electron-main.js # Electron main process
└── electron-builder.config.js
Contributions are welcome. Areas for improvement:
- Additional algorithm problems
- Performance analytics features
- User experience enhancements
- Documentation improvements
MIT License
Practice algorithms anywhere — on flights, cruises, or any offline environment.