D.E.Shaw interview experience Real time questions & tips from candidates to crack your interview

SDE - Intern

D.E.Shaw
upvote
share-icon
3 rounds | 7 Coding problems

Interview preparation journey

expand-icon
Preparation
Duration: 6 months
Topics: Data Structures, OOPS, Algorithms, DBMS, CP
Tip
Tip

Tip 1 : Be very clear with the fundamentals, when we use a particular data structure, what trade-offs are there for commonly used data structures?
Tip 2 : Do practice on a variety of topics and try to give a good number of contests that will help you in solving problems in fixed time.

Application process
Where: Campus
Eligibility: No criteria
Resume Tip
Resume tip

Tip 1 : Make sure you know everything you put on the resume.
Tip 2 : Have some projects, so you can discuss things with the interviewer.

Interview rounds

01
Round
Medium
Online Coding Interview
Duration90 minutes
Interview date8 Aug 2021
Coding problem3

There were 3 coding problems.
1 Easy, 2 mediums

1. Minimum Moves to Equal Array Elements

Moderate
0/80
Asked in companies
TwitterMorgan StanleyAdobe

Ninja has given an array 'ARR' containing 'N' integers; he can perform several moves on that array. In one move, he can increment any 'N' - 1 element of it by 1.

Ninja wants to make all elements of the array equal by performing some finite number of moves. As Ninjas friend, your task is to tell the Ninja that the minimum number of moves is needed to make all array elements equal.

Example:
Input: 'N' = 3, ‘ARR’ = [1, 2, 3] 
Output: 3

It is possible to make all elements of the given array equal by three moves only. There is no possible solution that can perform the task in minimum moves than 3.
[1, 2, 3] => [2, 3, 3] => [3, 4, 3] => [4, 4, 4]
Try solving now

2. Hat Combination

Hard
50m average time
60% success
0/120
Asked in companies
DirectiD.E.ShawCodenation

It is the birthday of the Ultimate Ninja Ankush, and his fellow Seito’s have decided to organize a party in the dojo. The Ultimate Ninja Ankush loves a party and brings hats for everyone, but the students are very choosy and prefer only some hats. Since Ankush is the Ultimate ninja, he loves a brain teaser. He wants to know the total Number of Combinations such that all students wear different hats.

There are ‘N’ students, and Ultimate Ninja Ankush has exactly 40 varieties of hats numbered from, each of the ‘N’ students have ‘M’ preference of hats out of the 40, and we want to know the total number of Combination such that all students wear different hats.

More Formally, There are n people and 40 types of hats labeled from 1 to 40.

Given a list of integers hats, where ‘hats[i]’ is a list of all hats preferred by the i-th person. Return the number of ways that the ‘N’ students wear different hats to each other. Since the answer may be too large, return it modulo 10 ^ 9 + 7.

For example:

Given:
‘N’ = 2, ‘M’ = 3.
‘Hats’ = [[1, 2, 3],
          [3, 4, 5]]

The answer will be 8, the combinations can be (1,3), (1,4), (1,5), (2,3), (2,4), (2,5), (3,4), (3,5).
Try solving now

3. Ninja And Chocolates

Moderate
20m average time
80% success
0/80
Asked in companies
FacebookSalesforceD.E.Shaw

Ninja is hungry and wants to eat his favorite chocolates but his mother won’t let him eat since he has already eaten enough chocolates. There are ‘N’ jars filled with chocolates. His mother has gone to the market and will home come after ‘M’ minutes. The ninja can eat up to ‘X’ chocolates per minute. Every minute when his mother is not there, he chooses any jar and takes out ‘X’ chocolates from that jar, and eats them. If any jar has less than ‘X’ chocolates, then he eats all of the chocolates in that jar but won’t eat any more chocolates during this minute. Your task is to print ‘X’ the minimum chocolate-eating speed of Ninja such that he eats all the chocolates within ‘M’ minutes before his mother comes back.

Try solving now
02
Round
Medium
Video Call
Duration50 minutes
Interview date10 Aug 2021
Coding problem2

The round started with 2 coding Questions and at last, we had a discussion about inheritance and polymorphism.

1. Remove K Corner Elements

Easy
15m average time
80% success
0/40
Asked in companies
Google incJio Platforms LimitedD.E.Shaw

Given an array ‘arr’ consisting of ‘N’ integer elements. You have to remove ‘K’ elements from the beginning or end of the array. Return the maximum possible sum of the remaining array elements.

Note: you can remove elements from both beginning and end, but a total of ‘K’ elements must be removed.

 

Example :

If N = 7 and K = 3, and the input array is:
{1, 2, 3, 4, 5, 6, 7}

After removing the first three elements, the resulting array now becomes {4, 5, 6, 7} and the sum of the remaining array is equal to 22.

Removing any other combination of three elements will always result in the remaining array sum less than 22.
Try solving now

2. Minimum Operations

Easy
20m average time
82% success
0/40
Asked in companies
BNY MellonLinkedInThought Works

You are given an array 'ARR' of 'N' positive integers. You need to find the minimum number of operations needed to make all elements of the array equal. You can perform addition, multiplication, subtraction or division with any element on an array element.

Addition, Subtraction, Multiplication or Division on any element of the array will be considered as a single operation.

Example:

If the given array is [1,2,3] then the answer would be 2. One of the ways to make all the elements of the given array equal is by adding 1 to the array element with value 1 and subtracting 1 from the array element with value 3. So that final array would become [2,2,2]. 
Try solving now
03
Round
Medium
Video Call
Duration50 minutes
Interview date10 Aug 2021
Coding problem2

The round started with 2 coding Questions and at last, we had a discussion about oops and DBMS concepts.

1. Pair with Given Sum in a Balanced BST

Moderate
25m average time
65% success
0/80
Asked in companies
SalesforceCultfitMeesho

You are given the ‘root’ of a Balanced Binary Search Tree and an integer ‘target,’ you have to tell if there exists any pair of nodes such that the sum of their value is equal to the target.

More formally check if there exist any two distinct nodes, whose sum is equal to ‘target.’

Note:

A binary search tree, also called an ordered or sorted binary tree, is a rooted binary tree whose internal nodes each store a key greater than all the keys in the node's left subtree and less than those in its right subtree.

A balanced binary search tree is a tree in which each node has either 0 or 2 children.
Example:
For Example, the root node is given as follows :
‘ROOT’ = 5 2 6 -1 -1 -1 -1 and ‘target’ = 8, The answer will be true since the sum of both leaf nodes is equal to 8.
Problem approach

I stored inorder traversal of the BST in an array and then used 2-pointers to check if a pair exists.

The interviewer asked me to optimize the space as in this case, it is O(N).

I was unable to do that bit.

We can look the space optimized bit in the above solution.

Try solving now

2. Minimum Operations To Make Array Equal

Easy
10m average time
90% success
0/40
Asked in companies
OracleDunzoSprinklr

You are given an array ‘ARR’ of length ‘N’ which is filled with the values such that ARR[i] = (2*i + 1). You have to perform operations on the ‘ARR’ to make all elements of the array equal. In one operation, you can choose two elements from the array ‘ARR’ say ‘i’ and ‘j’, and can increment the value of ‘ARR[i]’ by one and decrement the value of ‘ARR[j]’ by one.

You have to find the minimum number of operations to make all the elements of the array ‘ARR’ equal. It is guaranteed that all elements of the array can be made equal using some operations.

Try solving now

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
SDE - Intern
1 rounds | 1 problems
Interviewed by D.E.Shaw
1096 views
0 comments
0 upvotes
SDE - Intern
2 rounds | 3 problems
Interviewed by D.E.Shaw
2236 views
1 comments
0 upvotes
SDE - Intern
3 rounds | 6 problems
Interviewed by D.E.Shaw
700 views
0 comments
0 upvotes
SDE - Intern
3 rounds | 6 problems
Interviewed by D.E.Shaw
865 views
0 comments
0 upvotes
Companies with similar interview experiences
company logo
SDE - Intern
3 rounds | 6 problems
Interviewed by Amazon
15605 views
4 comments
0 upvotes
company logo
SDE - Intern
4 rounds | 7 problems
Interviewed by Microsoft
15499 views
1 comments
0 upvotes
company logo
SDE - Intern
2 rounds | 4 problems
Interviewed by Amazon
10216 views
2 comments
0 upvotes