Years of coding, still stuck on logic tests?
Nalar trains the thinking, not the syntax. Five-minute lessons animated from real code, made for your phone.
Daily work and logic tests train different muscles
You aren't short on experience. Logic tests just measure things your job rarely asks for.
Daily work trains
- Wiring frameworks, APIs and libraries together
- Finding answers in docs and example code
- Debugging with logs and a debugger
- Days to finish, and a team to review
Logic tests ask you to
- Turn a short statement into steps
- Trace a loop in your head, with no debugger
- Find the edge case before the hidden tests do
- Pick a pattern that fits the time limit
One lesson, one idea
Each lesson is 5 to 9 short steps, and most of them are taps. Here are three, taken from real lessons.
1/3 · Explanation
Watch the code run
The animation comes from code that really runs. Each step marks what changed.
From lesson 4.4: Two sum with a map2/3 · Predict the result
Predict first, then run it
You pick an answer, then the code runs. Every wrong choice gets its own explanation.
From lesson 2.2: Loop boundaries3/3 · Arrange the code
Arrange the lines, tests decide
You put shuffled lines of code back in order. Test cases check the result, like in a real test.
From lesson 2.2: Loop boundaries
What's in the course
It starts with how to read a problem, then the patterns that come up most. New modules come out one at a time.
Part 1 · How to think
- 1Read the problemBreak a problem into clear parts, work the examples by hand, hunt edge cases, then write a plan before the code.4 lessons + challenge
- 2Trace code in your headRun code in your head with a trace table. Learn loop boundaries, break, continue, early return, and the usual reasons tests fail.4 lessons + challenge
- 3Brute force firstTry every option first. Then count the steps, read the constraints, and find the work that gets repeated.4 lessons + challenge
Part 2 · Core patterns
- 4Hash map: count and look upUse Map and Set to count frequencies, find duplicates, check anagrams, and solve two sum in one pass.4 lessons + challenge
- 5Two pointerssoonTwo indexes moving toward each other or side by side. For reversing, palindromes, pair sums in a sorted array, and merging.
- 6Sliding windowsoonA window that slides over an array or string. Fixed size first, then windows that grow and shrink.
- 7Prefix sums and running statesoonKeep the result so far so you never recount. Running totals, best so far, and range sums.
- 8Sort firstsoonSort first, then scan once. Includes the JavaScript sort() number trap and simple intervals.
Part 3 · Structures and recursion
- 9Stack and queuesoonLast in, first out, or first in, first out. For matching brackets, undo, and next greater element.
- 10RecursionsoonA function that calls itself. Base case, call stack, recursion tree, and memo.
- 112D gridssoonArrays inside arrays. Row and column indexes, neighbors, flood fill, and rotating a grid.
Part 4 · Test day
- 12Mixed practicesoonMixed problems in test format. Name the pattern first, then solve it. No timer.
Good to know
- Free
- No signup and no account. Progress stays in this browser.
- 5 to 7 minutes
- One lesson fits in a lunch break or a commute.
- Works on a phone
- Most steps are taps. Writing code is easier on a laptop, and you can skip it for later.
- Indonesian and English
- Every lesson comes in both languages.
- JavaScript
- All the code in this course is JavaScript, which you most likely use already.
Start with the first lesson
One short lesson, one idea: how to read a test problem before you write any code.