Stan Runge

Preparing for a junior software engineer tech interview

Mon Aug 31 2026

1. Big O & Complexity theory 2. Arrays & hashmaps 3. 2-pointers / sliding window 4. Strings 5. Stacks/queues, linked lists 6. Trees + BFS/DFS 7. Talk out loud A hashmap is a data structure that shows up a LOT, especially in beginner questions. If you learn nothing else, just know that you can use one to get and set elements in a speed of O(1). (This relies on a good hash function (https://en.wikipedia.org/wiki/Hash_function)) In JS, you can build a hashmap with the built in Map() object. With a hashmap, we can perform a few nice patterns that get asked in a lot of problems. Sometimes these patterns are literally the answer already, and sometimes you need to use them as only a part of your solution. Pattern 1: Counting frequency ```js const counts = new Map() for (const x of arr) { counts.set(x, (counts.get(x) ?? 0)) + 1) } ``` Pattern 2: Complement lookup ```js const seen = new Map() for (let i = 0; i < nums.length; i++) { const need = target - nums[i] if (seen.has(need)) return [seen.get(need), i] seen.set(nums[i], i) } ``` Pattern 3: Group by computed key ```js const groups = new Map() for (const s of words) { const key = s.split("").sort().join("") // for example: check for anagrams if (!groups.has(key)) groups.set(key, []) groups.get(key).push(s) } ``` Let's see this in action in a few Leetcode problems: