In this course, you’ll practice three patterns that solve a large share of array and string interview problems in JavaScript: hashing with Map and Set, two pointers, and sliding windows.
What You’ll Practice
- Hashing: remember what you’ve already seen in a
Mapor aSet, so a repeated scan becomes a single lookup - Two pointers: walk sorted or mirrored data from both ends, or two inputs side by side, in one pass
- Sliding windows: keep a running answer for a contiguous stretch as it moves through the data
You’ll also run into JavaScript details that interviewers like to probe: why map.get() can return a falsy 0, why sort() without a comparator puts 10 before 9, why an emoji has a length of 2, and why splice() inside a loop is slower than it looks.
How the Course Works
- Concept lessons introduce each pattern with a short example you can run.
- Exercises run in your browser on Node 26. Each problem is set in a web-app scenario, and you don’t need to install anything. Get a working solution first. Then a bonus test plays the interviewer’s follow-up: does your solution still hold up when the input gets large?
- AI-code reviews hand you a plausible function with hidden bugs. Your job is to find them and fix it, which is the skill you need whenever an assistant writes code for you.
- Recaps at the end of each section let Mentor AI look at your attempts and talk through whatever hasn’t clicked yet.
- Mixed Practice ends the course with a problem that combines patterns, a quiz on choosing the right pattern, and a mock interview.
Before You Start
You should be comfortable writing JavaScript functions, and working with arrays, objects, and loops. Knowing what O(n) and O(n²) mean helps. The concept lessons review the costs you’ll need.
Your Cheat Sheets
Two cheat sheets go with every course in this learning path. Keep them open while you practice. The patterns sheet shows how to spot each interview pattern, with a JavaScript template for it, and the complexity sheet lists what common JavaScript operations cost in time and space.