Skip to content

Delhivery Interview Questions and Answers (2026)

Delhivery’s loop is short (often under a week) but technically dense - a long, multi-problem DSA marathon followed by a design-and-behavioural round that leans on Delhivery’s own logistics-scale problems rather than generic prompts.

Round Duration What it tests
Online Assessment (HackerEarth) 60-90 min CS fundamentals MCQs + 3 medium coding problems
Technical Interview 1 60-120+ min Long DSA session (multiple problems) + project deep-dive
Technical Interview 2 45-60 min Low-level design, SQL, behavioural, sometimes a puzzle
HR Discussion 20-30 min Fit, offer discussion

Hosted on HackerEarth: MCQs spanning computer networks, OOP, DBMS, SQL, operating systems, and system security, combined with 3 coding problems at medium difficulty, often on trees and linked lists.

Common questions

  • MCQs on TCP/IP basics, normalization, OOP pillars, and process scheduling
  • Tree and linked-list manipulation problems
  • SQL query MCQs (joins, aggregations)
  • Basic system-security conceptual questions

A genuinely long DSA round - one candidate account on GeeksforGeeks describes a 2+ hour Codepair session with 5 problems and thorough edge-case probing - paired with a detailed project discussion.

Common questions

  • Find pairs in an array that sum to a given target
  • Design a stack that supports push, pop, top, and retrieving the minimum in O(1)
  • Tree/linked-list problems with follow-up edge-case questions
  • Detailed walkthrough of a resume project - architecture, hardest bug, trade-offs

Round-by-round narratives are on the Delhivery interview experience page.

Shifts to low-level design and SQL, sometimes run same-day as Round 1. Design prompts commonly borrow from Delhivery’s own logistics domain rather than staying purely abstract.

Common questions

  • Design a URL-shortening service - schema and scaling approach
  • Design a database for warehouses - entities, relationships, query patterns
  • Explain the CAP theorem with a distributed-database scenario
  • Write a SQL query to find the Nth highest salary/value in a table
  • Which design pattern (Singleton, Factory, Builder, Abstract Factory) fits a given scenario, and why

A closing conversation on motivation, logistics-domain interest, and offer details.

Common questions

  • Tell me about yourself and why Delhivery
  • How would you design a system to track a shipment across thousands of hubs in near real time
  • Tell me about a time you optimized a slow SQL query or a process end to end
  • Are you comfortable with the operational, high-volume nature of logistics tech

Sample answer frameworks for each of these are on the Delhivery HR interview questions page.

Why Delhivery’s design questions feel different

Section titled “Why Delhivery’s design questions feel different”

Because Delhivery runs a physical logistics network at national scale - warehouses, hubs, and delivery partners generating constant high-volume writes - its low-level and system-design questions are usually anchored to that reality: a warehouse database schema, a shipment-tracking system, or a URL-shortener-style service used internally for tracking links. Candidates who can reason about write-heavy, geographically distributed data (not just a textbook CRUD app) tend to stand out more than those who only rehearse generic LLD templates.

Common technical interview questions and answers

Section titled “Common technical interview questions and answers”
Q: How do you design a stack that returns the minimum in O(1)?

Keep a second “min stack” alongside the main stack. On every push, also push the smaller of the new value and the current min-stack top onto the min stack; on every pop, pop both stacks. Then top() reads the main stack’s top and getMin() reads the min stack’s top, so all four operations are O(1) time at the cost of O(n) extra space. The space-optimised variant stores only the encoded value 2*x - min when a new minimum arrives, letting you recover the previous minimum on pop without a second stack.

Q: How do you find all pairs in an array that sum to a target?

Iterate once with a hash map of values already seen. For each element x, check whether target - x is present; if so you have a pair, then insert x. This runs in O(n) time and O(n) space and handles negatives and unsorted input. If the array is already sorted and you must use O(1) extra space, use two pointers from both ends, moving the left pointer right when the sum is too small and the right pointer left when it is too large. Use a count map instead of a set when duplicates must be counted.

Q: Write a SQL query to find the Nth highest salary in a table.

The portable approach uses a window function: SELECT DISTINCT salary FROM (SELECT salary, DENSE_RANK() OVER (ORDER BY salary DESC) AS rnk FROM employees) t WHERE rnk = N; DENSE_RANK is the right choice because it gives tied salaries the same rank, so the “second highest” stays correct when two people earn the same amount. A simpler MySQL form is SELECT DISTINCT salary FROM employees ORDER BY salary DESC LIMIT 1 OFFSET N-1; Mention that the query returns nothing when fewer than N distinct salaries exist - interviewers often probe that edge case.

Q: How would you design a database for warehouses and shipment tracking?

Core entities are Warehouse/Hub (id, geo coordinates, capacity), Shipment (AWB number, origin, destination, current status, SLA date), ShipmentEvent (shipment_id, hub_id, event_type, timestamp), and Vehicle/Trip linking hubs. The key insight is that ShipmentEvent is an append-only, write-heavy fact table - you never update the shipment row in place for every scan; you insert an event and keep a denormalised current_status column for fast reads. Partition events by date and shard by a hash of the shipment id, index on (shipment_id, timestamp) for the tracking page, and move older partitions to cold storage. That write-heavy, geographically distributed framing is exactly what Delhivery’s interviewers look for.

Q: Explain the CAP theorem with a distributed database example.

CAP says a distributed system facing a network partition must choose between consistency (every read sees the latest write) and availability (every request gets a non-error response); partition tolerance is not optional on real networks. A CP store like HBase or ZooKeeper refuses reads or writes on the minority side of a partition rather than serve stale data. An AP store like Cassandra or DynamoDB keeps accepting writes on both sides and reconciles later using last-write-wins or vector clocks. For hub scan events you usually pick AP so a hub can keep scanning during a network blip, but for a payment or COD ledger you pick CP.

Q: How would you design a URL shortening service?

Store a mapping table with short_code as primary key plus long_url, created_at, expiry, and owner_id. Generate codes either by base62-encoding an auto-increment or Snowflake-style id, which guarantees uniqueness without collision checks, or by hashing the URL and taking the first seven characters with a retry on collision. Seven base62 characters give roughly 3.5 trillion codes, which is ample. Redirects are heavily read-dominated, so front the datastore with a cache keyed on short_code, and return HTTP 301 for permanent links or 302 when you need every hit to reach your servers for click analytics.

Q: When would you use the Singleton, Factory, and Builder patterns?

Singleton guarantees one instance with a global access point - suitable for a connection pool or config registry, though it hurts testability and needs double-checked locking with a volatile field to be thread-safe. Factory Method centralises object creation behind an interface, so a caller asks for a CourierPartner without knowing whether it gets a third-party or in-house implementation; that is the natural fit when new subtypes appear often. Builder handles objects with many optional fields - a Shipment with optional COD amount, insurance, and fragile flags - giving readable chained construction and an immutable result instead of a telescoping constructor.

Q: How do you detect and remove a loop in a linked list?

Use Floyd’s cycle detection: advance a slow pointer one node and a fast pointer two nodes per step; if they ever meet, a cycle exists. To find the loop’s start, reset one pointer to the head and then move both one step at a time - they meet at the entry node. To remove the loop, walk to the node just before that entry and set its next pointer to null. The algorithm is O(n) time and O(1) space, which is why interviewers prefer it over the hash-set approach that costs O(n) memory.

Frequently asked questions about Delhivery interviews

Section titled “Frequently asked questions about Delhivery interviews”
What is Delhivery’s interview process for freshers?

Delhivery’s process typically runs 3-4 rounds: 1. Online Assessment (on HackerEarth) - MCQs on computer networks, OOP, DBMS, SQL, operating systems, and 3 medium-difficulty coding problems. 2. Technical Interview 1 - a long DSA session (candidates report 5+ problems solved live on a shared coding pad) plus project deep-dive. 3. Technical Interview 2 - low-level design, SQL, and behavioural/puzzle questions, sometimes same-day as Round 1. 4. HR discussion - fit and offer. The full loop can move fast, sometimes wrapping within about a week.

What does Delhivery’s online assessment cover?

It’s hosted on HackerEarth and combines MCQs (computer networks, OOP, DBMS, SQL queries, operating systems, system security) with 3 coding problems of medium difficulty covering data structures like trees and linked lists.

How many technical rounds does Delhivery have?

Most candidates go through 2 technical interviews after the OA, followed by an HR discussion - so 3-4 rounds total. Given Delhivery is a logistics-technology company, expect at least one round to touch practical, scale-oriented problems (like designing a warehouse database or a URL-shortener-style service) rather than pure textbook DSA.

How should I prepare for Delhivery interviews?

Practice medium-level coding problems (trees, linked lists, arrays, and a stack-with-getMin-in-O(1) style question), revise SQL and be ready to write queries live (e.g., finding the Nth highest salary), brush up on OOP/DBMS/OS/networking basics, and practice low-level design fundamentals - design patterns (Singleton, Factory, Builder), CAP theorem, and a warehouse or shipment-tracking data model - since Delhivery’s business is logistics at high volume.

Is Delhivery’s technical round long?

Candidate reports describe the DSA round as unusually long and marathon-like - one GeeksforGeeks account describes a 2+ hour Codepair session with multiple problems and full edge-case discussion, followed by a same-day second round covering low-level design, behavioural questions, and a puzzle. Pace yourself and don’t rush the first problem expecting a short round.

Does Delhivery ask logistics-domain system design questions?

Yes. Beyond generic LLD, interviewers frame design questions around Delhivery’s actual domain - a database design for warehouses, a URL-shortening-style service, or a system for tracking shipments across hubs at scale. Being able to reason about high-write-volume, geographically distributed data (not just a textbook CRUD app) is a real differentiator here.

Looking for placement papers, OA practice, or coding questions?

Section titled “Looking for placement papers, OA practice, or coding questions?”