Learn
Build
Become
Curated articles written by practitioners. Deep dives into frontend, backend, databases, and systems — no fluff, no paywalls.
two-sum.ts
1// O(n) — single pass with hashmap
2function twoSum(nums, target) {
3 const seen = new Map()
4 for (let i = 0; i < nums.length; i++) {
5 const need = target - nums[i]
6 if (seen.has(need))
7 return [seen.get(need), i]
8 seen.set(nums[i], i)
9 }
10}
✓ All 24 test cases passed42ms · 16.2 MB
What's inside
Three ways to level up.
Read deeply, follow a curriculum, or grind problems with instant feedback. They're all stitched together — your progress carries everywhere.
Articles
In-depth, executable, syntax-highlighted. Run code blocks inline. Take notes that travel with you.
Browse articlesCourses
Module → item structure with sequential locks. Auto-graded checkpoints. Resume anywhere.
Coming SoonProblems
Six languages, real test cases, points & a global leaderboard. Sandboxed execution, no setup.
Coming SoonLatest writing
View all articlesFresh from the editors.
No articles yet — check back soon.
Our editors are working on the first batch.
NewsletterOne useful read,
One useful read,
every Tuesday.
Hand-picked from our editors. No fluff, no tracking, easy unsubscribe.
No spam. Unsubscribe any time.