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

SDE - 1

Delhivery
upvote
share-icon
3 rounds | 5 Coding problems

Interview preparation journey

expand-icon
Preparation
Duration: 5 months
Topics: Data Structures and Algorithms, OOPS Operation, DBMS, Computer Networking
Tip
Tip

Tip 1 : Practice around 300+ DSA questions .
Tip 2 : Always practice in coding contest.
Tip 3 : Practice in Hackathon for industry exposure.

Application process
Where: Campus
Eligibility: 8+ CGPA
Resume Tip
Resume tip

Tip 1 : It should be of only 1 page with crisp and clear information.
Tip 2 : Always keep it updated such as CGPA and with recent projects.

Interview rounds

01
Round
Medium
Online Coding Interview
Duration60 minutes
Interview date9 Sep 2021
Coding problem2

1. 0 1 Knapsack

Easy
15m average time
85% success
0/40
Asked in companies
DelhiveryTwitterWalmart

A thief is robbing a store and can carry a maximal weight of W into his knapsack. There are N items and the ith item weighs wi and is of value vi. Considering the constraints of the maximum weight that a knapsack can carry, you have to find and return the maximum value that a thief can generate by stealing items.

Problem approach

The question was the slight variation or slight modification of 0-1 Knapsack.
The main crux of the question was to indentify that it was based on 01 knapsack.
After identifying the pattern, i solved it using recursion and then memoized my solution and it passed all the test cases.

Try solving now

2. Anagram Substring Search

Moderate
35m average time
70% success
0/80
Asked in companies
AdobeMedia.netZS

Given two strings ‘STR’ and ‘PTR’. Find all the starting indices of ‘PTR’ anagram substring in ‘STR’. Two strings are anagram if and only if one string can be converted into another string by rearranging the character.

For example, ‘ABCD’ and ‘ACBD’ are two anagram strings because ‘ACBD’ can be converted into ‘ABCD’ by rearranging the ‘B’ and ‘C’. ’ABA’ and ‘ABB’ are not anagram because we can’t convert ‘ABA’ to ‘ABB’ by rearranging the characters of particular strings.

‘ABACD’ and ‘CABAD’ are anagram because ‘ABACD’ can be converted into ‘CABAD’ by rearranging the first ‘A’ with ‘C’ and second ‘A’ with ‘B’.

Note:
Strings ‘STR’ and ‘PTR’ consist only of English uppercases.

Length of string ‘STR’ will always be greater than or equal to the length of string ‘PTR’.

The index is ‘0’ based.

In case, there is no anagram substring then return an empty sequence.

Explanation:

For example, the given ‘STR’ is ‘BACDGABCD’ and ‘PTR’ is ‘ABCD’. Indices are given

0-3 in ‘STR’ index 0,1,2,3 are ‘BACD’ and it is an anagram with ‘ABCD’
1-4 in ‘STR’ index 1,2,3,4 are ‘ACDG’ and it is not anagram with ‘ABCD’
2-5 in ‘STR’ index 2,3,4,5 are ‘CDGA’ and it is not anagram with ‘ABCD’
3-6 in ‘STR’ index 3,4,5,6 are ‘DGAB’ and it is not anagram with ‘ABCD’
4-7 in ‘STR’ index 4,5,6,7 are ‘GABC’ and it is not anagram with ‘ABCD’
5-8 in ‘STR’ index 5,6,7,8 are ‘ABCD’ and it is an anagram with ‘ABCD’

Hence there are 2 starting indices of substrings in the string ‘STR’ that are anagram with given ‘PTR’  which are index 0 and 5.
Problem approach

It was a direct problem on String matching Algorithm.
After checking the constraints , it was pretty obvious that i have to use RABIN KARP Algo for the same.

Try solving now
02
Round
Easy
Video Call
Duration60 minutes
Interview date9 Sep 2021
Coding problem2

1. Binary Tree Zigzag Traversal

Easy
15m average time
85% success
0/40
Asked in companies
OlaAmazonPayU

You have been given a Binary Tree of 'N' nodes, where the nodes have integer values. Your task is to print the zigzag traversal of the given tree.

Note:
In zigzag order, level 1 is printed from left to right fashion, level 2 is printed from right to left. and level 3 is printed from left to right again, and so on…..
For example:
For the given binary tree

1

The zigzag  traversal is [1, 4, 3, 5, 2, 7, 6]
Problem approach

This is one famous questions related to Binary Tree.
I solved it with BFS approach using queue Data Structures.

Try solving now

2. Product Of Array Except Self

Easy
26m average time
0/40
Asked in companies
IntuitQualcommFacebook

You have been given an integer array/list (ARR) of size N. You have to return an array/list PRODUCT such that PRODUCT[i] is equal to the product of all the elements of ARR except ARR[i]

 Note :
Each product can cross the integer limits, so we should take modulo of the operation. 

Take MOD = 10^9 + 7 to always stay in the limits.
Follow up :
Can you try solving the problem in O(1) space?
Problem approach

I started with Brute Force approach as initially there were no codition on using division operator or not.
But i was given some test cases where my solution was giving wrong answer then i applied some chanes and at last i was given the codition that i can't use the division operator.
The. after sometime i proposed a solution where i was using 2 array one prefix and suffix array to store the product of array elements from start to index i and end to index i respectively.
Later on i was asked to optimise the space and i done this using 1 array instead of 2.

Try solving now
03
Round
Easy
Video Call
Duration45 minutes
Interview date9 Sep 2021
Coding problem1

1. DBMS Questions

1. What is a foreign key?

2. Difference between SQL and NO SQL database.

Here's your problem of the day

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

Skill covered: Programming

How do you remove whitespace from the start of a string?

Choose another skill to practice
Similar interview experiences
company logo
SDE - 1
3 rounds | 3 problems
Interviewed by Delhivery
1377 views
0 comments
0 upvotes
company logo
SDE - 1
3 rounds | 5 problems
Interviewed by Delhivery
1085 views
0 comments
0 upvotes
company logo
SDE - 1
3 rounds | 6 problems
Interviewed by Delhivery
1292 views
0 comments
0 upvotes
company logo
SDE - 1
1 rounds | 3 problems
Interviewed by Delhivery
449 views
0 comments
0 upvotes
Companies with similar interview experiences
company logo
SDE - 1
2 rounds | 3 problems
Interviewed by BNY Mellon
6365 views
3 comments
0 upvotes
company logo
SDE - 1
3 rounds | 6 problems
Interviewed by BNY Mellon
0 views
0 comments
0 upvotes
company logo
SDE - 1
3 rounds | 5 problems
Interviewed by CIS - Cyber Infrastructure
2197 views
0 comments
0 upvotes