[00:00:00] Hi there. It's great to meet you. I'm Alex and I'm a senior software engineer here.
[00:00:05] I've been with the company for about two years, mostly working on the back-end architecture team.
[00:00:11] To give you an idea of how today will go, we have about 45 minutes together.
[00:00:17] We'll spend the first few minutes chatting about your background, then we'll dive into a coding exercise for about 30 minutes.
[00:00:22] Finally, I'll leave the last 10 minutes for you to ask me any questions.
[00:00:28] Awesome. To kick things off, I saw your recent work on the data migration project.
[00:00:35] Could you give me a brief one-minute overview of your core responsibilities there and the tech stack you used?
[00:00:40] Absolutely. I was a backend developer working primarily with Node.js and PostgreSQL.
[00:00:54] My main responsibility was migrating our legacy REST APIs to GraphQL, which reduced payload size by about 20%.
[00:01:00] Great, thanks. Let's move on to the coding portion. Use any language you are most comfortable with.
[00:01:23] Prompt: return indices of two numbers that sum to a target; return empty array if none; don't use same element twice.
[00:01:41] Example: [2,7,11,15], target 9 -> [0,1].
[00:01:55] Clarification: can contain negative numbers, and the array is not sorted.
[00:02:06] Candidate approach: avoid O(n²) brute force by using a hash map of seen values to indices.
[00:02:24] For each number, compute target - current and check if complement exists in the hash map.