Delhivery interview experience Real time questions & tips from candidates to crack your interview

Software Developer

Delhivery
upvote
share-icon
3 rounds | 4 Coding problems

Interview preparation journey

expand-icon
Journey
I am Ayush Anand Tripathi, a B.Tech CSE graduate from the class of 2024. I previously worked at GeeksforGeeks, where I also completed my internship. My primary interest lies in software development, particularly in backend services. Additionally, I have solved over 2000 DSA/Competitive Programming problems.
Application story
I came across a LinkedIn post by the HR team regarding a walk-in drive. I sent my resume along with some basic details via email and was successfully shortlisted.
Why selected/rejected for the role?
I was selected because of my work experience in my previous organization and my achievements, where I highlighted my rankings and ratings in coding contests on my resume. Additionally, my interview went well, especially the first round, where I quickly solved both DSA problems.
Preparation
Duration: 5 months
Topics: DSA, System Design, SQL, DBMS, Any backend framework - django/spring-boot
Tip
Tip

Tip 1: Practice at least 500 DSA problems.
Tip 2: Practice SQL queries and DBMS.
Tip 3: Prepare any backend technology.

Application process
Where: Linkedin
Eligibility: 1-2 years of experience with System Design/SQL and proficiency in Python or Java, (Salary Package: 15 LPA)
Resume Tip
Resume tip

Tip 1: Mention some good project and your detailed work experience if any.
Tip 2: Mention your achievements with supporting statistics to showcase your impact effectively.

Interview rounds

01
Round
Medium
Face to Face
Duration50 minutes
Interview date8 Feb 2025
Coding problem2

The first round lasted 50 minutes, and the interviewer was quite relaxed. We started with introductions, followed by a discussion about my journey and experience. He then provided a Google Doc with the first problem and asked me to implement the solution in my local editor, which I completed in 20 minutes. The second problem required me to explain the approach first and then write the pseudocode.

1. Maximum Consecutive Ones

Moderate
30m average time
70% success
0/80
Asked in companies
DelhiveryFacebookMakeMyTrip

Given a binary array nums[ ] and an integer k, return the maximum number of consecutive 1's in the array if you can flip at most k 0's.

Problem approach

I had previously solved a similar problem, so I had an idea of how to approach the solution. First, I asked the interviewer for test cases and then explained my thought process, outlining how the problem could be solved using the Sliding Window technique.
Approach:
Step1 : Declare two pointers i and j representing the window [i.....j].
Step2 : Use a variable count to store the number of 0s in the current window.
Step3 : If the window is valid (count <= k), expand it and update the answer; otherwise, shrink it from the left.
Time Complexity: O(N), Space Complexity: O(1).

Try solving now

2. Largest Distance Between Two Nodes In A Tree

Moderate
15m average time
85% success
0/80
Asked in companies
SamsungInnovaccerMicrosoft

Given a weighted, undirected tree, the task is to find the maximum path distance between any two nodes.

Problem approach

Explanation: It took me some time to dry-run the problem, and then I explained that this can be solved using a simple DFS function.
Steps: 

Perform a DFS traversal to find the maximum path value if the current node is the root. 

Identify the two child nodes with the highest path sums and combine them.
The time complexity is O(N), and the space complexity is O(N).

Try solving now
02
Round
Hard
Face to Face
Duration60 minutes
Interview date8 Feb 2025
Coding problem1

1. System Design

Design a hybrid caching system that efficiently supports both Least Recently Used (LRU) and Least Frequently Used (LFU) eviction policies. Your task is to implement a cache that dynamically adjusts between LRU and LFU based on the access patterns of stored keys.
The cache should support the following operations efficiently:
get(key) -> value: Retrieves the value associated with the key if it exists in the cache; otherwise, returns -1.
put(key, value): Inserts a key-value pair into the cache. If the cache reaches its capacity, it must evict an item based on a combination of LRU and LFU policies.

The cache should intelligently switch between LRU and LFU behaviour based on access patterns

Problem approach

Least Recently Used (LRU)
LRU discards the least recently used item when the cache reaches its capacity.
It is effective in scenarios where recently accessed elements are more likely to be used again.
Implemented using a doubly linked list and a hash map, where the most recently accessed item is moved to the front, and the least recently accessed is at the back.

Least Frequently Used (LFU)
LFU discards the least frequently used item when the cache is full.
It is useful when some elements are accessed far more often than others.
Implemented using a frequency map, where each frequency bucket contains keys used that many times.

Hybrid Approach (LRU + LFU)
The cache should be adaptive, meaning:
If multiple items have the same frequency, use LRU to decide eviction.
If an item is accessed more frequently, it should remain in the cache even if it was accessed a long time ago.
The cache should maintain both recency and frequency to make efficient eviction decisions.

03
Round
Easy
Face to Face
Duration45 minutes
Interview date10 Feb 2025
Coding problem1

It was Managerial Round. The engineering manager conducted this round, starting with a discussion about my introduction and work experience. After that, we moved on to technical questions, beginning with C++ pointers—their definition and their relationship with arrays in C++. Then, he asked basic questions on Node.js and Express.js. Finally, he presented me with a puzzle, which I solved with some hints.

1. Puzzle

You are given 9 balls, where 8 balls weigh 100 grams each, and 1 ball weighs 95 grams (lighter). You need to identify the odd (lighter) ball using the minimum number of operations. You have access to a weighing machine with two sides, and in each operation, you can compare the weight of two sets of balls.

Problem approach

You can find the odd ball in just 2 operations using the following approach:
1. Divide the 9 balls into 3 groups, each containing 3 balls.
2. Perform the first weighing:
-> Compare two groups on the weighing machine.
-> If both groups are equal in weight, the odd ball is in the third group.
-> If the weights differ, the lighter group contains the odd ball.
3. Perform the second weighing:
-> From the identified group of 3 balls, pick any two balls and compare their weights.
-> If they are equal, the third ball is the odd one.
-> If they are unequal, the lighter ball is the answer.

Here's your problem of the day

Solving this problem will increase your chance to get selected in this company

Skill covered: Programming

What is recursion?

Choose another skill to practice
Similar interview experiences
company logo
Software Developer
3 rounds | 3 problems
Interviewed by Delhivery
1106 views
0 comments
0 upvotes
company logo
Software Developer
3 rounds | 6 problems
Interviewed by Delhivery
1570 views
0 comments
0 upvotes
company logo
Software Developer
2 rounds | 2 problems
Interviewed by Delhivery
1240 views
0 comments
0 upvotes
company logo
Software Developer
3 rounds | 5 problems
Interviewed by Delhivery
1061 views
0 comments
0 upvotes
Companies with similar interview experiences
company logo
Software Developer
3 rounds | 3 problems
Interviewed by HCL Technologies
3394 views
1 comments
0 upvotes
company logo
Software Developer
3 rounds | 6 problems
Interviewed by Arcesium
1684 views
0 comments
0 upvotes
company logo
Software Developer
3 rounds | 5 problems
Interviewed by HCL Technologies
4080 views
0 comments
0 upvotes