53 questions · from 11 interviews · 2 asked more than once
Dp World interview questions
Every question candidates reported from their Dp World interviews, most frequently asked first. Each links to the write-up it came from, so you can see the round and how it went.
Dp World coding and DSA questions
- 01
Group Anagrams
Given an array of strings strs, group the anagrams together. You can return the answer in any order.
Medium · Asked 2 times · From D P World | Group SDE 2 | DSA
- 02
Capacity to Ship Packages Within D Days
Given an array of package weights weights and an integer days, return the least weight capacity of the ship that will result in all the packages being shipped within days days.
Medium · Asked 2 times · From D P World | Group SDE 2 | DSA
- 03
Convert Binary Tree to Linked List
You are given a binary tree with nodes having left, right, and next pointers. Convert the tree into a linked list such that the 'next' pointer points to the next node in level order traversal. Discuss approaches and implement the optimized solution.
From DP World || Interview || SDE 1(Group SDE 1) || Round 2 and 3
- 04
Binary Search with Greedy Approach
A problem solvable using binary search combined with a greedy strategy. Exact details not remembered but involves applying greedy logic within a binary search framework.
From DP World || Interview || SDE 1(Group SDE 1) || Round 2 and 3
- 05
Cheapest Flights Within K Stops
Find the cheapest price from src to dst with at most k stops. If there is no such route, return -1.
Medium · From DP World || Interview || SDE 1(Group SDE 1) || Round 2 and 3
- 06
Merge Two Sorted Lists
Merge two sorted linked lists and return it as a sorted list. The list should be made by splicing together the nodes of the first two lists.
Easy · From DP World || Interview || SDE 1(Group SDE 1) || Round 2 and 3
- 07
Find Peak Element
A peak element is an element that is strictly greater than its neighbors. Given a 0-indexed integer array nums, find a peak element, and return its index. If there are multiple peaks, return the index to any of the peaks.
Medium · From DP World || Interview || SDE 1(Group SDE 1) || Round 2 and 3
- 08
Distinct Rectangles on Cartesian Plane
Given a list of points on the Cartesian plane, find the number of distinct rectangles that can be formed. Condition: The sides of the rectangle must be parallel to the X-axis or Y-axis.
- 09
Maximum Path Sum in Binary Tree with One Skip Allowed
A binary tree is given where each node has an integer value (positive or negative). We need to find the maximum path sum, but with the twist that we are allowed to skip at most one node on the path.
- 10
Max Area of Rectangle of 1s in Shifted Binary Array
Given a binary array, consisting 0s and 1s only of size n, using which we create a grid of size nxn where ith row is the ith left shift of the array. Find the max area of rectangle consisting of 1s only. N - 10^5
Hard · From [Reject] - Dp world - SDE 1 - 1.5 years experience
- 11
Longest Common Subsequence
Find the length of the longest common subsequence of two given strings.
- 12
Longest Valid Parentheses
Given a string containing just the characters '(' and ')', find the length of the longest valid (well-formed) parentheses substring.
- 13
JavaScript `this` and Prototypal Inheritance Output
function Dog(name) { this.name = name; } Dog.prototype.bark = function() { console.log('Hello, ' + this.name); }; const dog = new Dog('Tommy'); dog.bark(); const dogBark = dog.bark; dogBark();
- 14
JavaScript Variable Hoisting and Scope Output
let name = "John"; (function() { console.log(x); // ? let name = "Jerry"; console.log(x); // ? })();
- 15
JavaScript `Object.freeze` Immutability Output
const deepObj = Object.freeze({ a: { b: 2 }, c: 3 }); deepObj.a.b = 42; deepObj.c = 5; console.log(deepObj.a.b); console.log(deepObj.c); deepObj.a = { b: 50 }; console.log(deepObj.a.b);
- 16
JavaScript Event Loop and Asynchronous Execution Output
console.log(1) setTimeout(() ={ console.log(3) }, 0) Promise.resolve(() = { console.log(2) }) console.log(4)
- 17
Explain Event Loop
Explain the JavaScript Event Loop mechanism.
- 18
Explain Closures
Explain the concept of Closures in JavaScript.
- 19
Merge k Sorted Lists
You are given an array of k linked-lists, each sorted in ascending order. Merge all the linked-lists into one sorted linked-list and return it.
Hard · From DP World | Interview Experience | SDE-1 | March 2025 | Reject
- 20
Daily Temperatures
Given an array of integers temperatures represents the daily temperatures, return an array answer such that answer[i] is the number of days you have to wait after the ith day to get a warmer temperature. If there is no future day for which this is possible,…
Medium · From DP World | Interview Experience | SDE-1 | March 2025 | Reject
- 21
Best Time to Buy and Sell Stock
You are given an array prices where prices[i] is the price of a given stock on the ith day. You want to maximize your profit by choosing a single day to buy one stock and choosing a different day in the future to sell that stock. Return the maximum profit you…
Easy · From DP World | Interview Experience | SDE-1 | March 2025 | Reject
- 22
Largest Rectangle in Histogram
Given an array of integers heights representing the histogram's bar height where the width of each bar is 1, return the area of the largest rectangle in the histogram.
Hard · From DP World | Interview Experience | SDE-1 | March 2025 | Reject
- 23
Max Path Sum in Matrix
One on dynamic programming (max path sum from top to bottom in a matrix).
- 24
Search in Rotated Sorted Array
Given a sorted, rotated array of integers, find if element k exists. The interviewer asked how binary search works, its time complexity, and to derive the mathematical proof for O(log n). He insisted on solving it in a single binary search. I initially…
- 25
String Replacement with Arrays
Given a string s and three arrays (indices, sources, targets). For each index, we had to check if sources[i] occurs in s at indices[i]. If it does, replace it with targets[i]. It was replacing entire strings starting from indices[i], and not just characters.
13 more in the Dp World write-ups.
Dp World system design questions
- 01
Ride-Sharing Application Low-Level Design
You are tasked with designing and implementing a ride-sharing application where passengers can request rides, and drivers can be matched to them based on proximity. The application should handle different types of vehicles (such as cars, bikes, luxury cars)…
- 02
Parking Lot System Design
LLD Question: Parking Lot System. I started writing entities, but he quickly stopped me due to lack of time and asked how I would assign a parking spot.
Dp World behavioural and HR questions
- 01
Why Switch?
Why are you looking to switch companies?
From DP World | Interview Experience | SDE-1 | March 2025 | Reject
- 02
Why left first company?
Why did you leave your first company in 6-7 months?
From DP World | Interview Experience | SDE-1 | March 2025 | Reject
- 03
Teammate not doing work
You and your teammate are working on a project with strong deadlines. What would you do if your teammate is not doing anything, he straight up refuses to do any work? What will you do?
From DP World | Interview Experience | SDE-1 | March 2025 | Reject
Dp World other questions
- 01
Implement Weather App
Implement a weather application using React for the Online Assessment round.
- 02
What is Shadow DOM?
Discuss the concept and use of Shadow DOM.
- 03
LocalStorage vs. Cookies vs. SessionStorage
Compare and contrast LocalStorage, Cookies, and SessionStorage.
- 04
Implement TODO List in React
Implement a TODO list application using React JS with add, edit, and delete functionalities.
- 05
What is @Autowired?
What is @Autowired in Spring Boot?
From DP World | Interview Experience | SDE-1 | March 2025 | Reject
- 06
What is @Component?
What is @Component in Spring Boot?
From DP World | Interview Experience | SDE-1 | March 2025 | Reject
- 07
Not using @Component
What if we don't use @Component?
From DP World | Interview Experience | SDE-1 | March 2025 | Reject
- 08
Comparing Objects in Java
Questions about comparing objects in Java.
From DP World | Interview Experience | SDE-1 | March 2025 | Reject
- 09
Starting Spring Boot project from scratch
How to start a project from scratch and write a Spring Boot API.
From DP World | Interview Experience | SDE-1 | March 2025 | Reject
- 10
Multithreading program (Print 1-100 with 2 threads)
Write a program to print numbers 1-100 using 2 threads.
From DP World | Interview Experience | SDE-1 | March 2025 | Reject
Dp World interview questions FAQ
What questions are asked in Dp World interviews?
Candidates reported 53 distinct questions across 11 Dp World interviews. 38 coding and DSA questions, 2 system design questions, 3 behavioural and HR questions, 10 other questions.
Which Dp World interview questions are asked most often?
The most repeated are "Group Anagrams" (2 times), "Capacity to Ship Packages Within D Days" (2 times).
How difficult are Dp World interview questions?
Of the questions candidates rated, 17% were easy, 50% medium and 33% hard.