Gopuff · Software Engineer
Updated · 2026-09-15

Gopuff Software Engineer
Interview Guide 2026

Start with the difference between showing availability and reserving stock. Implement a small LRU cache, aggregate scoped updates and defend a conditional reservation write, then explain how to diagnose races and evolve service boundaries.

Practice 6 Software Engineer prompts
6Practice promptsAcross five skill areas
3With worked solutionsIncluded in the practice prompts
01

Confirm the role

typical

Read the exact opening and identify the role of Inventory consistency in its responsibilities. Write down confirmed requirements separately from assumptions about the company.

02

Attempt the fundamentals

typical

Begin with implement an lru catalog cache and reserve stock without overselling. State the contract aloud, then preserve the test case or diagram that exposed your first gap.

03

Work through failure cases

typical

Use the worked solutions to connect cache semantics to a concrete outcome. Change one assumption, explain what breaks and verify the revised result.

04

Explain and review

typical

Rehearse one project decision and a timed technical answer. Ask the interviewer which constraints matter before optimizing; use feedback to revise the weakest explanation.

Choose a category, try a prompt, then open its approach, worked solution or follow-up when you need it.

6 technical prompts3 include a worked solution

Implement an LRU catalog cache

mediumWorked solution
LRUCaching

Implement a capacity-bounded least-recently-used cache. A successful get and an update both make a key most recent; capacity zero stores nothing.

Approach
  1. Maintain a map plus recency order so lookup, insertion and moving a key are efficient. A doubly linked list is a language-independent design; an ordered dictionary is a concise reference implementation. State whether missing values use a sentinel or an exception.
  2. When updating an existing key, replace its value and move it to the most-recent end without increasing logical size. After insertion, evict the oldest key only when over capacity. Test an update before eviction because it catches many stale-order bugs.
  3. LRU is not a freshness guarantee. Inventory and price changes need invalidation or version checks, and checkout must use authoritative availability. Discuss memory limits, concurrency and oversized entries separately from entry count; the interview implementation is deliberately single-process.
Worked solution 40 min

Evict the least recently used key

With capacity two: put a, put b, get a, then put c. Determine which key is evicted.

  1. Insertion puts a then b in oldest-to-newest order. Getting a makes b the oldest. Inserting c exceeds capacity, so b is removed.
  2. Updating an existing key must also move it to the newest position. Use an ordered mapping for a compact Python reference, but explain the map-plus-linked-list equivalent if library containers are disallowed.
  3. Capacity zero accepts calls but stores no entries. Missing keys raise KeyError, so a cached None can still be distinguished from absence. The object is not thread-safe; a real shared cache requires a separate concurrency contract.
Python
from collections import OrderedDict

class LRU:
    def __init__(self, capacity):
        if capacity < 0:
            raise ValueError("negative capacity")
        self.capacity = capacity
        self.data = OrderedDict()
    def get(self, key):
        value = self.data[key]
        self.data.move_to_end(key)
        return value
    def put(self, key, value):
        self.data[key] = value
        self.data.move_to_end(key)
        if len(self.data) > self.capacity:
            self.data.popitem(last=False)

Scroll sideways to view long lines.

EXPECTED RESULTb is evicted, while a and c remain. Updating a makes it most recent.
Follow-up
  • How would you combine expiration with recency?
  • Why must cached availability not authorize a sale?

Aggregate repeated item updates

mediumWorked solution
AggregationComposite keys

Aggregate signed quantity deltas by (location, SKU), retaining first-seen key order. Explain validation and replay assumptions.

Approach
  1. Use a hash map keyed by both location and SKU. A SKU-only key would merge independent stock pools. Sum each accepted delta once, retaining the first appearance if deterministic output order is part of the contract.
  2. Clarify whether duplicate input rows are distinct business events or transport retries. Aggregating blindly is correct only after the input has been deduplicated where needed. Validate required keys and integer quantities at the boundary; do not silently coerce malformed records.
  3. The pass is O(n) expected time and O(u) space for u distinct keys. For unbounded streams, define a window or external state store. A negative net delta is valid for this exercise and does not by itself establish that physical stock is negative.
Worked solution 40 min

Aggregate deltas with scoped keys

Aggregate (L1,A,+3), (L2,A,+2), (L1,A,-1) after event deduplication.

  1. The keys are (L1,A) and (L2,A). The final delta for L1/A is two, while L2/A remains two. A SKU-only dictionary would incorrectly combine the two locations.
  2. Insertion-ordered dictionaries retain first-seen key order in modern Python. Updating a key does not move it, matching the contract. Return explicit triples so the composite identity remains visible to the caller.
  3. Treat the input as validated, deduplicated event deltas. This function does not check an event ID and must not be presented as safe under replay by itself. For large streams, move the same aggregation contract into a bounded window or durable stateful processor.
Python
def aggregate(rows):
    totals = {}
    for location, sku, delta in rows:
        key = (location, sku)
        totals[key] = totals.get(key, 0) + delta
    return [(loc, sku, total) for (loc, sku), total in totals.items()]

Scroll sideways to view long lines.

EXPECTED RESULT[("L1","A",2), ("L2","A",2)].
Follow-up
  • How would you add event-ID deduplication?
  • What changes when input exceeds memory?

Allow about one hour per session and move time toward the actual assessment. This is an editorial learning schedule, not the length of the hiring process.

Small steps. Visible outcomes.0 / 14 completed
Week 1

Build the foundations

Code, query and define your contracts.

0 / 7 done
01Map the actual role60 min
  • Read the official company resource and the specific vacancy.
  • List unknowns about interview format and tools.

Deliverable: A role brief separating stated requirements from assumptions

02Implement an LRU catalog cache60 min
  • Attempt the prompt before reading its approach.
  • Explain one boundary case and answer its follow-up.

Deliverable: A written answer with a concrete example and one corrected assumption

Practice prompt ↗
03Reserve stock without overselling60 min
  • Attempt the prompt before reading its approach.
  • Explain one boundary case and answer its follow-up.

Deliverable: A written answer with a concrete example and one corrected assumption

Practice prompt ↗
04Propagate inventory changes60 min
  • Attempt the prompt before reading its approach.
  • Explain one boundary case and answer its follow-up.

Deliverable: A written answer with a concrete example and one corrected assumption

Practice prompt ↗
05Aggregate repeated item updates60 min
  • Attempt the prompt before reading its approach.
  • Explain one boundary case and answer its follow-up.

Deliverable: A written answer with a concrete example and one corrected assumption

Practice prompt ↗
06Reproduce a concurrency failure60 min
  • Attempt the prompt before reading its approach.
  • Explain one boundary case and answer its follow-up.

Deliverable: A written answer with a concrete example and one corrected assumption

Practice prompt ↗
07Extract a service incrementally60 min
  • Attempt the prompt before reading its approach.
  • Explain one boundary case and answer its follow-up.

Deliverable: A written answer with a concrete example and one corrected assumption

Practice prompt ↗
Week 2

Connect & rehearse

Design, explain and revise with evidence.

0 / 7 done
08Evict the least recently used key60 min
  • Complete the worked exercise independently.
  • Run or manually trace its checks and compare with the expected result.

Deliverable: An implementation or decision diagram plus recorded checks

Practice prompt ↗Worked solution ↗
09Use a conditional stock update60 min
  • Complete the worked exercise independently.
  • Run or manually trace its checks and compare with the expected result.

Deliverable: An implementation or decision diagram plus recorded checks

Practice prompt ↗Worked solution ↗
10Aggregate deltas with scoped keys60 min
  • Complete the worked exercise independently.
  • Run or manually trace its checks and compare with the expected result.

Deliverable: An implementation or decision diagram plus recorded checks

Practice prompt ↗Worked solution ↗
11Connect the boundaries60 min
  • Draw the user request, state owner and one failure path.
  • Explain where retries, ordering or lifetime assumptions could fail.

Deliverable: An annotated workflow with a recovery check

12Prepare an evidence-based story60 min
  • Choose an actual project relevant to the role.
  • Explain your decision, a rejected option and feedback that changed it.

Deliverable: A two-minute story with an honest account of your contribution

13Run a timed mock60 min
  • Pick one technical prompt and one follow-up.
  • Record where you relied on an unstated assumption or could not explain a result.

Deliverable: A short list of specific gaps from the mock

Practice prompt ↗
14Repair and consolidate60 min
  • Redo the weakest exercise without looking at the answer.
  • Prepare questions about ownership, review and success in this exact team.

Deliverable: A tested final attempt and three questions for the interviewer

Expand any day for tasks and deliverables. Your progress is saved on this device.

Connect your experience to Inventory consistency and Cache semantics. Use an actual example; do not turn the hypothetical exercises into claims about your work.

  • 01

    Describe a requirement you clarified before changing an implementation. What example resolved the ambiguity?

  • 02

    Explain a tradeoff where correctness or maintainability changed your first approach. What did you test?

  • 03

    Describe feedback that changed your design. Identify your own action and what you would do differently now.

Are these confirmed Gopuff interview questions?

The topics were selected from a third-party company guide. PracHub wrote the clarified exercises, solution approaches and follow-ups. Their presence in that source is not independent confirmation of what a current interviewer will ask.

Dataford: Gopuff Software Engineer guide
What interview rounds should I expect?

The available evidence does not establish a verified team-specific sequence. Ask about screening, practical assessments, project discussions, tool rules and evaluation criteria for your actual opening. The visual checkpoints here describe preparation activities.

Must I use the language in the worked example?

Use the assessment language when specified. The reference snippets make a contract easy to test; they do not establish the employer stack. Explain how the same invariant maps to your chosen language, library and database.

How should I use the practice cards?

Choose a category, attempt the prompt and then open the approach. For a worked solution, compare both output and edge cases. Close it and try again with one changed requirement; recognition alone is not a reliable sign of understanding.

What should I prioritize with only a weekend?

Work through implement an lru catalog cache, attempt evict the least recently used key and prepare one honest project story. Record the assumptions you cannot defend, then resolve those before expanding the topic list.

How does editorial practice differ from the PracHub question bank?

These exercises live within this guide and do not create company question-bank records. The main practice button uses the current available bank for the company or role. Its count is separate from the number of editorial prompts.

PracHub: Software Engineer questions
Sources & methodology 6 sources ↗

Official role evidence, timestamped platform data and clearly labeled preparation advice.