A personal collection of LeetCode solutions and contest submissions in JavaScript, plus reusable utilities for common data structures.
Note
This repository is focused on practice and reference. There is no automated test framework; solutions are verified with manual runs.
- src/ — individual problem solutions (one file per problem id)
- src/utils/ — reusable data structures (e.g., segment tree, union-find)
- src/contest/ — weekly and biweekly contest submissions
- contest/ — additional contest archives
Prerequisites:
- Node.js 22.x
- pnpm (recommended)
Install dependencies:
pnpm installRun any solution file directly with Node.js:
node src/1.jsYou can also add quick manual checks inside a solution file using
console.log and run it the same way.
Tip
Use problem id files under src/ for main solutions, and src/contest/ for contest entries.
This project uses Biome for formatting and linting.
# Format all JS files in src
pnpm biome-fix
# Lint without writing changes
biome check src- Solutions use
var functionName = function (...) {}for LeetCode compatibility. - JSDoc comments are used for function signatures.
- Indentation is 2 spaces; single quotes and semicolons are required.
- lodash — utility helpers
- datastructures-js — additional data structures
Important
Prefer built-in JavaScript features. External libraries are used only when they simplify complex data structures.