Level: Intern
Round: Online Assessment · Type: Coding · Difficulty: 3/10 · Duration: 60 min · Interviewer: Neutral
Topics: Arrays, Sorting, Two Sum
Location: San Francisco Bay Area
Interview date: 2026-02-12
I received an Online Assessment after applying for an Applied Scientist Internship at Amazon. The assessment consisted of two coding problems.
The first question involved optimizing task completion given time constraints. I received two lists: one representing the time required for each task, and another representing the time already spent on each task. Given a total time 'x', I needed to prioritize allocating time to tasks with the smallest remaining time, maximizing the number of completed tasks. My approach involved subtracting the used time from the required time for each task, sorting the differences in ascending order, and then iterating through the sorted list, subtracting each remaining time from 'x' to determine the number of tasks that could be completed.
The second question was a variation of the Two Sum problem. Given an array of integers 'stocksProfit' representing potential profits from different stock trades, and a target integer 'target', I needed to find the number of distinct pairs (a, b) such that a + b = target. Each element could only be paired with another element at a different index, and pairing an element with itself was disallowed unless there were two identical values in the array. The goal was to count the number of distinct pairs that sum up to the target.