HackTheRounds Interview Experiences
Amazon New Grad OA Interview Experience (2026) - Interval Connectivity & Distinct Hash, Offer
Amazon NG OA 70 min HackerRank: Interval Connectivity Reduction (merge + greedy), Maximizing Distinct Hash Values (constructive greedy), plus Work Simulation LP
By Anonymous ยท 2026-04-15
Background
I wrapped the Amazon New Grad OA in about 13 minutes of the 70-minute window, then spent the rest of the session double-checking edge cases and rewriting variable names. The 2025-2026 cycle is noticeably softer on raw algorithmic difficulty compared to older OA sets on the forums, but the grader is stricter about robustness and boundary handling. This is the full play-by-play.
I'm a final-year student applying to the US NG SDE listings across Seattle and NYC. My background is mostly competitive programming and two summer internships at smaller startups. The OA link landed the day after I submitted the online application.
Timeline
- Application: mid-February, standard new grad posting
- OA invite: 4 days later via HackerRank
- OA coding (70 min) + work simulation + work style: completed in one 2.5 hour sitting
- Status change to "under review": 1 day
- VO invite: 9 days after OA
- Total OA turnaround: just under 2 weeks
Online Assessment (70 min total, coding portion)
Two problems on HackerRank. I finished T1 in 8 minutes and T2 in 5. The time cushion matters because the back-end scorer is known to check code complexity, variable naming, and dead logic, not only test cases.
T1: Interval Connectivity Reduction
Problem: You are given n intervals [start i, end i] . You may add at most k new intervals, each of length no more than limit . Return the minimum number of connected components (merged independent intervals) after your additions.
My approach was a clean three-step greedy:
- Sort the original intervals by start, then do the classic merge pass collapsing overlapping or adjacent ranges. You are left with m disjoint components and m-1 gaps between them.
- Measure each gap as `next.start - prev.end`. Any gap with length `<= limit` can be bridged with a single added interval.
- Sort the eligible gaps ascending and greedily bridge the smallest `k` of them. Each bridge reduces the component count by one. Answer is `m - bridged`.
O(n log n) end to end from the two sorts. Easy places to slip up: forgetting to sort before merging, mixing start[i+1] and end[i] in the gap calculation, or failing to cap the bridged count at exactly k. I saw a friend in the same week lose half his points because his loop never stopped adding bridges once k was exhausted.
Practice it: [[problem/165?company=3|Minimum Operations to Unbias Datasets]]
T2: Maximizing Distinct Hash Values
Problem: Given an array params , maintain a rolling hash with update rule current = (current + i params[i]) % MOD . You can reorder the indices freely. Return the maximum number of distinct values the hash takes across all prefixes.
This is a constructive greedy. The insight is that the larger the delta between consecutive current values, the more likely the new value lands outside the set of values already seen. Sort params descending, walk through once accumulating the rolling hash, and collect each value into a HashSet . Edge cases worth calling out:
- If `params[i] == 1`, the contribution depends entirely on the index, so do not assume it is useless.
- If MOD is small and the output saturates, the distinct count is capped by MOD, not by n.
- The answer is `|seen|`, not the number of distinct values in `params`. Conflating those is the most common wrong read.
O(n log n) from the sort, O(n) to scan. Returning |seen| at the end gives the rolling hash's distinct-value count across prefixes.
Practice it: [[problem/163?company=3|Maximum System Memory Capacity]]
Work Simulation (50 min)
Five scenario modules framed as inbox emails from a fake PM. Two of them were a SaaS inventory design and a real-time voting service design. For each action, you rate effectiveness from "Not at all" to "Extremely." The grader is looking for Leadership Principles alignment, especially Customer Obsession, Bias for Action, and Ownership.
I walked through every module twice: first pass to rate by gut, second pass to verify each rating makes sense when mapped back to an LP. Rewriting a couple of ratings on the second pass moved me from "probably passing" to "clearly passing."
Work Style Assessment
Personality questionnaire. Agree / Disagree on statements like "I am comfortable making decisions with incomplete information." There is no trick, just make sure your answers are internally consistent. Amazon runs a reliability check and inconsistent answers tank your score.
Result
Passed all three OA sections on the first attempt. VO invite arrived 9 days later. I'll write up the VO separately once I'm cleared to post it.
Tips
- Read T1 twice before typing. Interval problems on Amazon OA routinely bury a constraint in the last sentence, like "each new interval must be length `<= limit`" or "start and end may be equal." If you miss it, you will submit a solution that passes 3 of 8 tests.
- Name your variables like a human. `maxPoints`, `remainingOps`, `currentEnd`. Not `a`, `b`, `x`. The OA grader is known to flag single-letter identifiers in readability checks.
- Greedy plus sorting is the default tool. For NG-level OAs in the 2026 cycle, the modal pattern is sort, scan, accumulate. If your first instinct is 2D DP on a problem with n up to 100000, you are over-engineering.
- Map every Work Sim action to an LP before rating. If you can't explain why an action is Customer Obsession or Ownership, your rating is probably wrong. Do not let "this sounds reasonable" carry you.
- Finish fast, then audit. The bonus of finishing the coding portion in 15 minutes is not the time saved, it's the 55 minutes of audit time. Add edge-case asserts, rename variables, delete commented-out scratch. The grader cares.
- Keep a printed LP cheat sheet for Work Sim. Customer Obsession > Bias for Action > Ownership > Deliver Results in that order of frequency in the prompts I saw. "Dive Deep" and "Invent and Simplify" appear less often but are the tiebreakers.
If you are a new grad panicking at the HackerRank link in your inbox, the honest read is: the bar is about code quality, not algorithmic depth. Practice medium greedy and interval problems, get your variable-naming reflex clean, and treat OA2 with the same seriousness you treat the coding half. You will be fine.