Delhivery’s loop is short (often under a week) but technically dense - a long, multi-problem DSA marathon followed by a design-and-behavioral round that leans on Delhivery’s own logistics-scale problems rather than generic prompts.
Delhivery interview process
- Online Assessment (HackerEarth)60-90 min
- Technical Interview 160-120+ min
- Technical Interview 245-60 min
- HR Discussion20-30 min
| 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, behavioral, sometimes a puzzle |
| HR Discussion | 20-30 min | Fit, offer discussion |
Delhivery interview questions with 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-optimized 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 denormalized 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 centralizes 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.
Q: How do you print a matrix in spiral order?
Maintain four boundaries - top, bottom, left, right. Traverse top row left→right, right column top→bottom, bottom row right→left (if still valid), left column bottom→top (if still valid), then shrink the boundaries inward until they cross. Each element is visited once, so time is O(m×n) and extra space is O(1) besides output. Delhivery OA lists on GeeksforGeeks also cite array sorting (0/1/2 Dutch flag), merge sort, and LRU cache as recurring patterns - worth timed practice even if your loop skips OA.
Q: What backend topics show up beyond DSA in recent Delhivery loops?
Lateral and full-stack reports mention live SQL (joins, indexes), Kafka basics, Spring transaction boundaries, and LLD prompts such as a simplified sports-score or shipment-tracking module with schema design. Java full-stack candidates should expect framework theory (Spring/Hibernate) plus one LLD round, not only LeetCode mediums.
Delhivery interview questions by role
These topics come from GfG Delhivery interview experiences and GfG’s Delhivery recruitment process page.
| Role | Reported questions and topics |
|---|---|
| SDE (campus) | Round 1 (1 hour): your internship, character frequency with hashing, unordered vs ordered map, an inner-join SQL query on two tables, post-order traversal of a BST, big data and Hadoop, what kind of language JavaScript is. Round 2 (30 minutes): when the clock hands overlap between 2 and 3, your best project, React and JSX with Babel and the virtual DOM, Hooks and Promises. |
| SDE-1 (referral / lateral) | A 2+ hour Codepair round with five DSA problems (string, array with a hard DP follow-up, a well-known tree problem with a follow-up), then a same-day round with LLD, Amazon-style behavioral questions and a puzzle. |
| 2025 Software Developer and backend intern | Code360 entries from 2025: a walk-in Software Developer loop of 3 rounds with 4 coding problems, and a backend intern loop of 2 rounds with 6 coding problems. Specific problems are not public in the snippets. |
| Earlier campus SDE drives | Minimum cost path (DP, then BFS), a postman delivering on a 4x4 grid in minimum time, overlapping rectangles, reversing letters in place while special characters stay put in O(n) time and O(1) space, and user-level vs kernel-level threads. |
Asked across every role: tell me about yourself, your favorite subject, and a detailed walk through your best project.
Delhivery online assessment: quick answers
These answers are compiled from public candidate reports and prep guides, not from an official Delhivery notice, and drives differ.
| Question | Answer |
|---|---|
| How many questions and how long? | A 2021 campus test ran 90 minutes on HackerEarth: 10 MCQs (4 marks each) on SQL, OS, DBMS, trees, linked lists, OOP, networks and system security, plus 3 coding problems - Max Subarray (50 marks), Cheapest Buy (20) and Finding Pairs (20). An older drive had 2 coding problems and 39 data-analysis MCQs, and a November 2019 campus test on Mettl ran 90 minutes with an English section (15 questions, 10 minutes) and an aptitude section (25 questions, 40 minutes). |
| Does it have negative marking? | No public report mentions any. |
| Is there a sectional cutoff? | Not reported. The weighting matters more: one coding problem was worth more than all 10 MCQs combined, so solve the heavy problem first. |
| How much is the cutoff? | Not published, and the filter is steep: about 200 students sat the 2021 campus test and 6 advanced, and in a November 2023 campus drive 146 took the test and 12 reached interviews. No CGPA or backlog rule is published in GfG’s process guide or the campus reports. |
| Which platform is it on? | HackerEarth in the 2021 campus test (a 2019 drive used Mettl); later live coding is on Codepair or Google Meet. |
| Which branches can apply? | The 2021 campus SDE drive was open to CSE, ECE and EEE. GfG’s process guide lists B.E., B.Tech or M.Sc. in computer science or a related field. |
| Is there always an OA? | No. A referral SDE-1 candidate had no online test and went straight to a 2+ hour Codepair interview, and a February 2025 Software Developer candidate on Code360 was hired through a walk-in drive advertised on LinkedIn. |
Online Assessment
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.
Eligibility (campus drives, candidate-reported): No CGPA or backlog rule is published; GfG’s process guide lists B.E., B.Tech or M.Sc. in computer science or a related field, and the 2021 drive was open to CSE, ECE and EEE. Some SDE-1 referral loops skip a separate OA and start directly on a long Codepair technical - confirm in the HR mail.
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
Technical Interview 1
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.
Technical Interview 2
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
HR Discussion
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
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 question clusters (with frameworks)
Logistics-tech themes: DSA, routing or warehouse sketches, and ops-aware behavior.
1. OA or Codepair DSA
Framework: Medium problems with clean complexity talk. Some SDE-1 loops lean live coding heavily.
2. Routing and optimization intuition
Framework: State constraints (capacity, SLA, hubs), propose a heuristic, discuss what breaks at festival peaks.
3. LLD plus behavioral hybrids
Framework: Design a small service, then ownership or conflict STAR in the same conversation.
4. Why logistics tech
Framework: Gurugram or Bengaluru hubs, real-world constraint love, not only “I like coding”.
How to prepare for Delhivery interviews
- Loop map: Online Assessment (HackerEarth); Technical Interview 1; Technical Interview 2; HR Discussion. Confirm timings from the drive mail.
- Technical depth: Drill the Q&A section until answers are spoken, not read. Know every resume project cold.
- Experiences: Study round-wise notes on the interview experience page.
- HR: Three STAR stories + a specific “Why Delhivery?” on the HR page.
A practical Delhivery prep plan
Use this as a default four-week loop before a Delhivery drive. Adjust to your invite timeline.
- Week 1: Timed aptitude + one easy coding problem a day, plus a one-page cs fundamentals sheet. Open the Delhivery previous-year sets on this site and mark which sections ate your time. Write the timing on a sticky note. That number is more useful than a 200-problem LeetCode streak you never timed.
- Week 2: Most Delhivery drives fail people on the first timed paper or OA. Do three timed sits this week. After each one, log every miss in a two-column note: topic and why (slow, wrong formula, bad edge case, panic). The next sit should only add problems from that log.
- Week 3: Technical interviews at Delhivery usually want a clean project story, one or two CS fundamentals, and (if the process has it) a behavioral or values round. Write STAR stories on paper, not in your head. Practice “Why Delhivery?” with one concrete product, lab, or business line - not a slogan.
- Week 4: Two full mocks, then only error-log topics - no new patterns. If you still have energy, redo only the questions you failed in week 2.
10-day crash version: Days 1-4 timed DSA, days 5-7 resume projects + CS fundamentals, days 8-9 mock interviews out loud, day 10 HR STAR stories on the HR page.
Compensation notes
Candidate-reported fresher/early-career packages for Delhivery often cite ₹10-20 LPA fresher band.
Frequently asked questions about Delhivery interviews
Does the Delhivery online assessment have negative marking?
No public report mentions negative marking. In a 2021 campus test on HackerEarth, each of the 10 MCQs carried 4 marks and the 3 coding problems carried 50, 20 and 20 marks, and no candidate report describes deductions for wrong answers.
What is the cutoff for the Delhivery online assessment?
Not published; shortlists are relative to the batch and tight. In a 2021 NIT Jamshedpur drive, about 200 students took the test and 6 advanced; the candidate who cleared it solved the 50-mark coding problem and answered all MCQs correctly. A November 2023 campus report on Code360 had 146 students take the test and 12 reach interviews. No CGPA cutoff is published; the 2021 drive was open to CSE, ECE and EEE.
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 behavioral/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, behavioral 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.
Does Delhivery ask system design for freshers?
Often, at a practical level - many loops include routing, warehouse, or tracking sketches. Focus on constraints and failure modes more than trendy architecture buzzwords.
Where does Delhivery hire engineers?
Commonly cited tech locations include Gurugram, Bengaluru, and Hyderabad. Confirm on your specific role.
Delhivery campus hiring vs referral SDE-1 hiring
Campus drives start with a 90-minute HackerEarth test (MCQs plus weighted coding problems), then one or two short technical rounds that mix DSA, SQL, CS basics and questions on whatever stack your resume lists, and a final technical and managerial round.
Referral and lateral SDE-1 hiring usually skips the online test. Candidates go straight to a long Codepair DSA round (2+ hours, about five problems with follow-ups), then a same-day round on LLD, behavior and a puzzle, then HR. This page covers both routes; if you came through a referral, prepare for the long live-coding session rather than MCQs.
Sources
For round-by-round stories, see the Delhivery interview experience page. For OA papers and coding drills, use Delhivery on placementpapers.app. OA quick answers and role-wise questions draw on GfG’s Delhivery interview experiences (on-campus 2021, SDE-1 referral and earlier sets), GfG’s Delhivery recruitment process page (updated July 2025), and Code360 Delhivery interview experiences (2019 and November 2023 campus, February and May 2025) seen through search snippets.