LIMITED TIME 🎁: Register now to get 60 minutes of AI Mock Interviewing for FREE!

Join
    Amazon Interview Insights
    Amazon logo
    Amazon·Software Engineer·Onsite - Multi Round·Junior
    JuniorRejected
    Aug 2026Berlin
    7

    Summary

    Went through the full Amazon SDE-1 loop in Berlin for the recent grad program and got rejected. Four interview rounds plus an online assessment, covering system design, algorithms, a GenAI-flavored coding problem, and behavioral questions. Sharing this in case it helps someone else prep better than I did.

    Questions Asked(7)

    Algorithms & Data Structures
    A
    Author's notesFirst line only

    This was the online assessment coding problem.

    Suggested Approach

    Sort customers by bid amount in descending order, using a round-robin mechanism to fairly break ties among equal bidders. Iterate through the sorted list, allocating warehouse inventory greedily until stock runs out, then collect all customers who received zero items.

    Pro tip: Explicitly clarify the warehouse's total inventory and whether each item type has separate stock before coding — Amazon interviewers reward candidates who surface ambiguities early, and this shows system-design thinking even in an algorithmic problem.
    1

    Clarify Constraints & Edge Cases

    Ask about total inventory size, whether item counts per customer can exceed remaining stock (partial fulfillment), and confirm the round-robin tie-breaking rule. This surfaces hidden requirements and shows structured thinking.

    2

    Design the Sorting & Tie-Breaking Strategy

    Sort customers descending by bid amount. For customers with equal bids, assign them a round-robin order — this can be modeled by preserving their original insertion order within each tie group and cycling through them sequentially.

    3

    Simulate the Allocation

    Iterate through the sorted (and tie-broken) customer list, subtracting each customer's desired item count from remaining inventory. Handle partial fulfillment if allowed, or skip customers whose full request cannot be met.

    4

    Collect Unfulfilled Customers

    Track which customers received zero items — either because inventory was exhausted before reaching them or their request exceeded remaining stock. Return their IDs as the result.

    5

    Analyze Complexity & Optimize

    Discuss time complexity O(n log n) for sorting and O(n) for allocation, totaling O(n log n). Mention that a max-heap (priority queue) is an alternative if customers arrive in a stream rather than as a batch.

    Key Points to Mention

    Descending sort by bid with a stable or explicitly managed round-robin for tie-breaking among equal bids
    Greedy allocation: serve highest bidders first until inventory is depleted
    Handling partial fulfillment vs. all-or-nothing fulfillment as a clarifying question
    Using a priority queue (max-heap) as an alternative for streaming/online scenarios
    Edge cases: all customers tie on bid, single item in inventory, customer desired count larger than total stock
    O(n log n) time complexity and O(n) space complexity trade-offs
    System DesignAPI & IntegrationsTechnical Trade-offs
    A
    Author's notesFirst line only

    The base question is easy enough, but the follow-ups are where it gets real.

    Suggested Approach

    Start by clarifying requirements and constraints (scale, latency SLAs, discount types), then design a clean API contract before diving into the internal architecture. Structure your answer around separation of concerns — pricing service, discount engine, and caching layer — while explicitly calling out how each component enables future extensibility and handles large-scale load.

    Pro tip: At Amazon, mentioning idempotency, eventual consistency trade-offs, and how your design aligns with their Leadership Principles (especially 'Think Big' and 'Scale') will resonate strongly — frame discount extensibility as a plugin/strategy pattern to show you're designing for a platform, not just a feature.
    1

    Clarify Requirements & Constraints

    Ask about expected QPS, acceptable latency (p99), types of discounts anticipated (coupon codes, bulk, loyalty tiers), and whether prices need to be real-time or can tolerate slight staleness. Confirm whether the API is internal or customer-facing, as this affects auth and SLA requirements.

    2

    Define the API Contract

    Design a RESTful or gRPC endpoint such as POST /cart/price with a request body containing product IDs, quantities, user ID, and optional promo codes, returning a structured response with line-item breakdown, applied discounts, and total. Emphasize versioning (e.g., /v1/) from day one to support future changes without breaking clients.

    3

    Design the Core Architecture

    Decompose into a Pricing Service (fetches base prices from a Product Catalog), a Discount Engine (applies rules via a strategy pattern for extensibility), and an Aggregator that computes the final total. Use asynchronous batch fetching of product prices to minimize latency and avoid N+1 database calls.

    4

    Plan for Scale & Resilience

    Introduce a distributed cache (e.g., Redis) with a short TTL for product prices to reduce database load at high QPS, and use circuit breakers for downstream service calls. Design the system to degrade gracefully — for example, returning cached prices with a staleness flag if the catalog service is unavailable.

    5

    Address Discount Extensibility

    Model the Discount Engine using a strategy or rules-engine pattern (e.g., a chain of responsibility) so new discount types can be added without modifying core pricing logic. Store discount rules in a configuration store or database to allow non-engineer teams to update rules without deployments.

    Key Points to Mention

    Strategy/plugin pattern for the Discount Engine to enable open/closed principle and future discount types without code changes
    Distributed caching (Redis/Memcached) with TTL-based invalidation to handle high QPS on product price lookups
    Idempotency and request deduplication to safely handle retries at scale without double-applying discounts
    API versioning and backward compatibility to evolve the contract without breaking existing consumers
    Observability: structured logging, distributed tracing (e.g., AWS X-Ray), and metrics (latency, error rate, cache hit ratio) for production readiness
    Batch/bulk fetching of product data to avoid N+1 query problems and reduce downstream service pressure
    Algorithms & Data StructuresTechnical Trade-offs
    A
    Author's notesFirst line only

    This was labeled the GenAI interview but the actual coding problem had nothing obviously AI-specific about it.

    Suggested Approach

    Frame this as a priority-based matching problem where specificity determines rank — a rule with fewer DEFAULT wildcards is more specific and should win over a more generic one. Walk through a concrete algorithm that scores or sorts candidate rules by specificity, then returns the best match for the given query tuple. Make sure to clarify edge cases like ties, no match, and all-DEFAULT rules upfront.

    Pro tip: Amazon loves scalability discussions — proactively mention how your solution performs when the rule table has millions of rows or when queries arrive at high throughput, and suggest indexing or trie-based optimizations to show senior-level thinking.
    1

    Clarify the Problem Constraints

    Confirm the matching semantics: a rule matches a query if each key in the rule is either equal to the query value or is DEFAULT. Ask about tie-breaking rules, whether multiple matches are possible, and expected table size to scope the solution.

    2

    Define a Specificity Score

    Assign a score to each rule based on the number of non-DEFAULT (concrete) values — more concrete values means higher specificity and higher priority. For example, with 3 keys, a fully concrete rule scores 3 and an all-DEFAULT rule scores 0.

    3

    Filter Candidate Rules

    Iterate through the rule table and collect all rules that match the query, meaning each key in the rule equals the corresponding query value or is DEFAULT. This produces the candidate set of valid matches.

    4

    Select the Best Match

    From the candidate set, return the rule with the highest specificity score; if there is a tie, apply a secondary tie-breaking strategy such as rule insertion order or lexicographic key priority. If no candidates exist, return a 'no match' result.

    5

    Discuss Optimizations and Trade-offs

    Analyze the naive O(N) scan per query and propose optimizations such as pre-sorting rules by specificity descending so you can return the first match, or building a trie/decision-tree index on the key columns to reduce lookup time for large rule sets.

    Key Points to Mention

    Specificity scoring: rank rules by the count of concrete (non-DEFAULT) key values to resolve conflicts deterministically
    Two-phase algorithm: first filter all matching rules, then select the highest-specificity winner — separating concerns improves clarity
    Edge cases: all-DEFAULT catch-all rule, zero matches, multiple rules with identical specificity scores, and null/missing query values
    Time complexity trade-off: O(N·K) naive scan vs. O(K log N) with pre-sorted rules or trie-based indexing, where N is rule count and K is key count
    Data structure choices: a sorted list enables early termination, while a hash-map keyed on concrete values can skip irrelevant rules entirely for hot paths
    Real-world relevance: this pattern appears in pricing engines, routing tables, and policy systems — mentioning this shows applied engineering awareness
    Product Sense & Ideation
    A
    Author's notesFirst line only

    Straightforward enough.

    Suggested Approach

    Anchor your answer in concrete, real-world examples of AI tools you actively use (e.g., GitHub Copilot, ChatGPT, Amazon CodeWhisperer) and demonstrate a deliberate, iterative mindset toward prompt engineering. Show that you treat AI as a productivity multiplier while maintaining critical judgment over its outputs, which aligns with Amazon's emphasis on ownership and high standards.

    Pro tip: Mentioning that you document and version your most effective prompts — or share them with your team — signals engineering maturity and a 'raise the bar' mentality that resonates strongly with Amazon's leadership principles.
    1

    Name Your Tools & Use Cases

    Open by listing 2-3 specific AI tools you use and the distinct engineering tasks each supports, such as code generation, debugging, documentation, or code review. Being specific immediately establishes credibility and relevance.

    2

    Walk Through a Concrete Example

    Describe a real scenario where an AI tool meaningfully impacted your workflow — include the problem, how you used the tool, and the measurable outcome. This grounds your answer in evidence rather than generality.

    3

    Explain Your Prompt Improvement Process

    Detail the deliberate techniques you use to refine prompts, such as adding context, specifying constraints, using chain-of-thought prompting, or iterating based on output quality. This demonstrates a systematic, engineering-minded approach to AI usage.

    4

    Address Quality Control & Critical Thinking

    Explain how you validate AI-generated outputs — for example, running tests, code reviews, or cross-referencing documentation — to ensure correctness and avoid blindly trusting results. This shows you maintain ownership and high standards.

    5

    Connect to Team & Broader Impact

    Briefly mention how you share learnings, effective prompts, or best practices with teammates to scale the benefit beyond yourself. This reflects Amazon's leadership principle of thinking big and developing others.

    Key Points to Mention

    Specific AI tools used professionally (e.g., GitHub Copilot, ChatGPT, Amazon CodeWhisperer, Claude) and their distinct use cases in your engineering workflow
    Prompt engineering techniques such as providing rich context, role-setting, few-shot examples, chain-of-thought instructions, or output format constraints
    An iterative refinement loop — how you evaluate an AI response, identify gaps, and adjust the prompt to get a better result
    Critical validation practices to verify AI outputs, including unit tests, peer review, or manual inspection before merging or deploying
    Awareness of AI limitations such as hallucinations, outdated knowledge, or security risks with sensitive code — and how you mitigate them
    Knowledge sharing or documentation of effective prompts within your team to improve collective productivity
    Algorithms & Data Structures
    A
    Author's notesFirst line only

    Classic BFS problem, take the last node at each level.

    Suggested Approach

    Use a Breadth-First Search (BFS) level-order traversal to process the tree level by level, capturing the last node visited at each level as the rightmost visible node. This approach naturally maps to the problem since 'visible from the right' means the last node at each depth when viewed from right to left. Alternatively, a DFS approach tracking depth can also work by always visiting the right child first.

    Pro tip: Mention both BFS and DFS solutions to show breadth of knowledge, then explain your trade-off reasoning — BFS is more intuitive for this problem, but DFS uses O(h) space on the call stack versus O(w) for BFS where w is the max tree width, which can matter for wide trees.
    1

    Clarify the Problem

    Confirm edge cases with the interviewer: what to return for a null/empty tree, and verify that 'right side view' means the last visible node at each level, not just right children. This shows thoroughness and avoids assumptions.

    2

    Choose and Explain Your Approach

    Propose BFS using a queue to traverse level by level, explaining that the last element dequeued at each level is the rightmost visible node. Briefly mention the DFS alternative to demonstrate awareness of multiple solutions.

    3

    Code the Solution

    Implement BFS with a queue, iterating through each level using the queue's current size as the level boundary, and appending the last node's value of each level to the result list. Keep the code clean and well-named.

    4

    Trace Through an Example

    Walk through a sample binary tree (e.g., [1, 2, 3, null, 5, null, 4]) step by step to verify correctness, showing the output [1, 3, 4]. This demonstrates confidence and helps catch any bugs.

    5

    Analyze Complexity

    State that both time and space complexity are O(n), where n is the number of nodes, since every node is visited once and the queue holds at most one full level of nodes at a time. Mention the O(h) space trade-off for the DFS approach.

    Key Points to Mention

    BFS level-order traversal using a queue with level-size boundary tracking
    DFS alternative: preorder traversal visiting right child first, recording the first node seen at each new depth
    Edge cases: null/empty tree returns an empty list, single-node tree returns that node's value
    Time complexity O(n) and space complexity O(n) for BFS, O(h) for DFS recursion stack
    The result captures the last node at each level, not just nodes that are right children — a node on the left can be visible if the right subtree is shorter
    Use of a deque (collections.deque in Python) for efficient O(1) popleft operations in BFS
    Algorithms & Data Structures
    A
    Author's notesFirst line only

    Also pretty standard.

    Suggested Approach

    Use a hash map to track character frequencies as you process the stream, and a queue (or ordered structure) to maintain insertion order so you can efficiently find the first unique character. Once the stream ends, iterate through the queue to return the first character whose count is exactly one. This two-data-structure approach balances O(1) lookups with O(1) order tracking.

    Pro tip: Proactively discuss the 'stream' constraint — unlike a static string, you may not be able to revisit earlier characters, so mention that your solution processes each character exactly once in O(1) time per character, which demonstrates awareness of real-world streaming limitations that Amazon's systems face at scale.
    1

    Clarify Requirements & Constraints

    Ask whether the stream is finite or infinite, what character set is used (ASCII, Unicode), and what to return if no unique character exists. Confirm whether you need to return the result after the full stream is consumed or in real-time after each character.

    2

    Choose the Right Data Structures

    Select a hash map to store character frequencies and a doubly linked list or queue to preserve insertion order of characters. Explain that the combination allows O(1) frequency updates and O(1) removal of characters that become non-unique.

    3

    Process the Stream

    For each incoming character, increment its count in the hash map; if it's seen for the first time, add it to the queue. If its count exceeds one, mark it as invalid (or remove it from the linked list if using that structure).

    4

    Extract the Answer

    After the stream ends (or on demand), traverse the queue from the front and return the first character whose frequency in the hash map is exactly one. Handle the edge case where no such character exists by returning null or a sentinel value.

    5

    Analyze Complexity & Trade-offs

    State that time complexity is O(n) overall with O(1) per character, and space complexity is O(k) where k is the size of the character set (bounded, e.g., 26 for lowercase letters or 128 for ASCII). Mention trade-offs such as using a fixed-size array instead of a hash map for a smaller character set.

    Key Points to Mention

    Hash map for O(1) frequency tracking — explain why a map is preferred over sorting or brute force O(n²) scanning
    Queue or doubly linked list to maintain insertion order and enable efficient first-unique lookup
    Single-pass O(n) processing — critical for true streaming scenarios where re-reading the stream is not possible
    Edge cases: empty stream, all characters repeated, only one character, or a stream with a very large character set (Unicode)
    Space complexity is O(k) bounded by the character set size, not the stream length — important distinction for infinite streams
    Real-time variant: discuss how to return the current first-unique character after each new character is received, not just at stream end
    Cross-functional Alignment
    A
    Author's notesFirst line only

    Bar raiser behavioral.

    Suggested Approach

    Use the STAR method to tell a specific, concrete story that highlights your empathy, collaboration, and ownership mentality. Focus on how you proactively identified the colleague's struggle and took deliberate steps to support them without undermining their autonomy. Tie the outcome back to team or business impact to demonstrate that helping others is a strategic, not just social, behavior.

    Pro tip: Amazon deeply values 'Earn Trust' and 'Are Right, A Lot' — frame your story to show you listened carefully to understand the root cause of your colleague's struggle before jumping to solutions, as this signals both emotional intelligence and sound judgment.
    1

    Set the Scene

    Briefly describe the context — the project, the team, and your colleague's role. Establish why the situation mattered and what was at stake for the team or product.

    2

    Identify the Struggle

    Explain how you noticed your colleague was struggling — whether through direct observation, a 1:1 conversation, or a missed deadline. Highlight that you took initiative rather than waiting to be asked.

    3

    Understand Before Acting

    Describe how you took time to listen and diagnose the real problem — whether it was a technical blocker, unclear requirements, or personal bandwidth. This shows empathy and analytical thinking.

    4

    Take Targeted Action

    Detail the specific steps you took to help — pair programming, knowledge sharing, re-prioritizing your own tasks, or connecting them with the right resources. Be concrete about your personal contribution.

    5

    Share the Outcome

    Quantify the result where possible — did the project ship on time, did your colleague grow in a skill, or did team morale improve? Reflect briefly on what you learned about collaboration or leadership.

    Key Points to Mention

    Proactive identification of the colleague's struggle without being asked
    Active listening and empathy to understand the root cause before offering solutions
    Balancing your own responsibilities while making time to support a teammate
    Specific, practical actions taken (e.g., code review, knowledge transfer, unblocking a dependency)
    Measurable or observable positive outcome for the colleague, team, or project
    Any long-term impact such as improved team processes or the colleague gaining new skills

    Discussion(7)

    Sign in to join the discussion.

    C
    CodeWithMaya· 3d ago
    Q6Given a stream of characters of arbitrary length, return the first character that appears exactly once across the entire stream.

    The streaming follow-up is the real question. A linked hashmap works fine when you can buffer the whole stream, but if the stream is arbitrarily large you can't assume that. The interviewer was probably probing whether you'd think about approximate solutions: a count-min sketch can estimate character frequencies with bounded memory, though it only gives you a probabilistic answer. If you need exactness and the alphabet is bounded (which it is for characters, say Unicode code points), you can keep a fixed-size frequency array plus a separate ordered structure just for candidates with count one, and update it as you go without storing the stream itself. That's O(alphabet size) space regardless of stream length. Whether you need the exact first unique character or can tolerate a small error rate is the question worth asking back.

    V
    VectorVector· 3d ago
    Q2Design a shopping cart price calculator API: given a list of product IDs, return the total price. Plan for future discount logic and assume this runs at large scale.

    The caching angle absolutely should have been predictable given the scale framing at the start. Whenever an Amazon system design question mentions large scale and then introduces a hot-path scenario, a cache question is coming. The pattern they usually want is something like: product price data is mostly static, so cache aggressively at the product level with an invalidation strategy tied to catalog updates, maybe a short TTL or an event-driven bust when prices change.

    For the discount layering, the cleaner mental model is a pipeline of discount rules applied in sequence rather than nested conditionals. Each rule takes a cart state and returns a modified one. Buy-three-get-one-free on a specific item is tricky because you need to decide what 'free' means when the item appears in fractional quantities or when other discounts have already touched it. The defensible answer is to apply item-level promos before cart-level ones and to floor the free quantity at zero. The double discount threshold (over 100 EUR or more than 10 items) needs a clear spec on whether 'or' is inclusive and whether you apply it before or after item discounts change the cart total. I'd have explicitly asked the interviewer to confirm that, which also buys you a moment to think.

    Q
    QuestionsByK· 3d ago
    Q1You have a warehouse selling items to customers who submit bids. Each customer has an ID, a bid amount, and a desired item count. Highest bidders get served first; ties are broken by round-robin. Return the IDs of customers who received nothing.

    The round-robin piece is genuinely the crux here. What I'd do is sort all customers descending by bid, then group consecutive customers with the same bid amount together before touching any inventory. Within each group, you serve them in round-robin order until stock runs out, which means you need to cycle through the group repeatedly, giving one unit per customer per pass, until either everyone in the group is satisfied or you hit zero stock. Customers who got nothing by the end go into your result set. The edge case that bites people is a group where stock runs out mid-cycle: some customers in that tie group get served and some don't, and you have to track per-customer received counts carefully to know who ends up empty. I'd probably use a deque for the tie group so you can rotate naturally. Getting the grouping logic right before writing the simulation loop is exactly the right instinct.

    S
    SamTheRecruiter· 3d ago
    Q4How do you use AI tools in your day-to-day work, and what do you do to improve the quality of your prompts or queries?

    The requirements file question is actually pretty telling about where Amazon is heading with their GenAI push. What they were probably fishing for is something close to how you'd structure a spec for an autonomous coding agent: a context section (what codebase, what stack, what constraints), a goals section (what the agent is trying to accomplish in this session), explicit constraints or guardrails (what it must not do, what APIs it cannot call, rate limits, security boundaries), and then success criteria so the agent can self-evaluate. It mirrors how you'd write a good PRD, honestly, which makes sense because a lot of the research on agent reliability traces failures back to underspecified task definitions rather than model capability gaps.

    For the broader prompt quality question, the thing that actually moved the needle for me was treating prompts more like function signatures. You specify inputs, expected output format, edge cases to handle, and tone or verbosity. When I started adding a short 'anti-requirements' section (do not include X, avoid Y) my outputs got noticeably less noisy. Mentioning that kind of iterative, structured approach would have landed better than listing tools you use, because Amazon at the SDE-1 level is less interested in which LLM you chat with and more interested in whether you think systematically about the interface between your intent and the model's behavior.

    L
    Lily_P· 3d ago
    Q7Tell me about a time you helped a colleague who was struggling.

    Bar raiser behavioral rounds at Amazon are where the STAR format actually earns its keep, not because it's magic but because rambling on the resolution is exactly the failure mode you described and STAR forces you to timebox it. The resolution part should be two or three sentences max: what changed, what the measurable outcome was, done. What they're really listening for in a 'helped a colleague' story is whether you show any judgment about why the colleague was struggling (skill gap vs. context gap vs. personal situation) because that changes how you'd help, and whether you mention any cost to yourself, since helping that required zero sacrifice isn't much of a story.

    T
    TheCareerCo· 3d ago
    Q5Given the root of a binary tree, return the values visible from the right side, ordered top to bottom.

    Yeah this one's pretty much a freebie if you know BFS. Take the last node at each level, done. The only wrinkle worth mentioning unprompted is that 'visible from the right' doesn't mean rightmost child exists, it just means the last node encountered in a level-order traversal, so a left-only subtree still contributes a visible node at its depth.

    MT
    Marcus Thorne· 3d ago
    Q3A rule is an ordered list of match keys like country, brand, and customer tier. Given a table of concrete values with a DEFAULT wildcard, and a query like (DE, acme, silver), return the matching result.

    Rule matching with wildcards is basically a specificity-ranking problem. The 'best match' question is open-ended on purpose because there genuinely are multiple valid semantics. First-hit means rule table order matters and you stop at the first row that matches your query on all keys (DEFAULT counts as matching anything). Most-specific-first means you score each matching row by how many non-DEFAULT fields it has and return the highest scorer, breaking ties by table order or some other secondary criterion. There's also a longest-prefix style where key order matters and you prefer matches that are concrete on earlier keys even if they're DEFAULT on later ones. The interviewer probably wanted you to name these and then pick one to defend with a concrete example showing where the others would give a wrong answer. Saying 'it depends on the use case' is fine but you have to follow it up with an actual case where each definition wins.

    Interview Details

    CompanyAmazon
    RoleSoftware Engineer
    RoundOnsite - Multi Round
    LevelJunior
    OutcomeRejected
    DateAug 2026
    LocationBerlin

    Questions in this post

    Share your own experience

    Help the community by sharing what you went through.