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

SDE - 1

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

Interview preparation journey

expand-icon
Journey
My journey began like most CS students—focusing on core Data Structures and Algorithms (DSA). However, I quickly realized that to crack top-tier firms like Google or D. E. Shaw & Co., knowing how to code isn’t enough; you need to understand how computers work. While preparing for placements at IIT Guwahati, I shifted my focus toward Systems Programming. I spent months diving deep into Operating Systems, multithreading, and memory management. Instead of just solving coding problems, I started analyzing the low-level efficiency of my solutions, exploring branchless programming and cache optimizations. This “systems-first” mindset was a game changer during interviews, as it allowed me to discuss trade-offs beyond simple Big-O notation. A turning point for me was balancing academic projects, like my thesis on chaotic hashing, with practical engineering. I also spent significant time mastering Computer Networks and System Design, ensuring I could explain not just the “what,” but the “why” behind every architectural decision. My advice to aspirants: don’t just aim to “crack” the interview; aim to master the craft. Whether it’s building a complex project like a C++ poker bot or dissecting an OS scheduler, let your genuine curiosity drive your preparation. When you are truly passionate about how systems work, interviews transition from a “test” to a high-level technical conversation with a peer.
Application story
I applied for the role through the on-campus placement drive at IIT Guwahati. The process began in August with an intensive preparation phase focused on DSA and core CS fundamentals. The first stage was a rigorous Online Assessment (OA) that tested complex algorithmic problem-solving and speed. Following the OA, I was shortlisted for the offline interview rounds held on campus. The experience was fast-paced, as I went through two back-to-back technical interviews. Being in person allowed for a much more interactive technical discussion, where I could use a whiteboard to explain my logic for system-level optimizations and architectural trade-offs. The recruiters were highly professional, and the transition from the initial screening to the final interview was seamless.
Why selected/rejected for the role?
Rejected. I couldn’t perform well in Round 3, which was a system design round, although I performed well in Rounds 1 and 2, which focused on SA and systems questions.
Preparation
Duration: 3 Months
Topics: Data Structures, Pointers, OOPs, System Design, Algorithms, Dynamic Programming, Operating Systems, Linux, Computer Networks
Tip
Tip

Tip 1: Master the "systems" perspective of DSA.

Tip 2: Deep dive into OS and networking fundamentals.

Application process
Where: Campus
Eligibility: No criteria, (Salary Package - 74 LPA)
Resume Tip
Resume tip

Tip 1: Go through all the projects mentioned in your resume thoroughly.

Tip 2: If you have mentioned OS or Networks as courses, then study them thoroughly.

Interview rounds

01
Round
Hard
Online Coding Interview
Duration120 minutes
Interview date17 Oct 2025
Coding problem7

1. Water Jug Problem

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

You are given two water jugs with capacities X and Y litres respectively. Both the jugs are initially empty. There is an infinite amount of water supply available. The jugs do not have markings to measure smaller quantities.

The following operations are allowed:

• Fill any of the jugs entirely with water.
• Empty any of the jugs.
• Pour water from one jug into another till the other jug is full, or the first jug itself is empty.

You are required to tell whether it is possible to measure exactly ‘Z’ litres using both of the jugs.

If Z litres of water is measurable, you must have Z litres of water contained within one or both buckets by the end.

For example:

In order to measure 2 litres from jugs of 4 and 6 litres we can follow the following steps-

• Fill 6-litres jugs to its maximum capacity.
• Pour water from 6-litres jug to the jug with 4-litres capacity.
• Pour water from 6-litres jug to the jug with 4-litres capacity.
Problem approach

Logic Steps

1) Data Structuring: Create a list of objects or a vector of tuples to store each drink's attributes: coffee_qty, chocolate_qty, and its original_index (1-indexed).

2) Define Comparator: Implement a sorting function based on the prioritized rules:

Rule 1 (Pure Coffee): If one drink has chocolate == 0 and the other doesn't, the one with 0 chocolate ranks higher.

Rule 2 (Coffee Quantity): If both are "pure" or both are "mixed," the one with the higher coffee_qty ranks higher.

Rule 3 (Chocolate Quantity): If coffee quantities are equal, the one with the higher chocolate_qty ranks higher.

Rule 4 (Input Order): If all quantities are equal, the drink that appeared earlier in the input ranks higher.

3) Query Handling: After sorting, the drink at sorted_list[r-1] is the answer for rank r. Store the results in an array to return

Try solving now

2. Smit’s String Flip Game.

Hard
50m average time
45% success
0/120
Asked in companies
D.E.ShawFareportal

Smit has been given a string ‘STR’ of length ‘N’, which only consists of ‘0’ and ‘1’ and an operation to be performed ‘K’ times on the string.

The operation description is as follows:

For every ‘i’ from ‘0’ <= ‘i’ < ‘N’, if there exist indices ‘(i-1)’ and ‘(i+1)’ such that ‘STR[i-1] = STR[i+1]’ then set the value of ‘STR[i]’ to ‘1’. If ‘(i-1)’ or ‘(i+1)’ is out of the index range or ‘STR[i-1]’ != ‘STR[i+1]’ then set ‘STR[i]’ to ‘0’.

For e.g. if ‘STR’ = “0000”, then after the operation the string ‘STR’ will be transformed to “0110” because for ‘i’ = ‘1’ and ‘i’ = ‘2’ the condition mentioned above is satisfied.

Note: When transforming we take into account the values of the old string given in the problem or we received after the application of the last operation not the newly transformed string in the current operation.

He has got an answer but is not completely sure if it is correct. So being, his friend he asked you to help him verify if his answer is correct or not. Can you help Smit to determine the correct string ‘STR’ after ‘K’ above-mentioned operations?.

EXAMPLE :
Input: ‘N’ = 5, ‘K’ = 1, ‘STR’ = “10101”

Output: 01110
In this case, the indices satisfying the condition of ‘STR[i-1] = STR[i+1]’ are ‘1’, ‘2’, and ‘3’. Hence the string ‘STR’ after applying the given operation for ‘K(=1)’ times will be “01110”.
Problem approach

Logic Steps

Prefix-Flip Logic: To make a string uniform using prefix flips, an operation is required at index i if S[i]=S[i+1]. The total operations for a fixed string is the count of adjacent mismatches plus a potential final flip to match the target (0 or 1).

Contribution Technique: Instead of generating all 2k strings, calculate how much each adjacent pair (S[i],S[i+1]) contributes to the total sum.

Handling '?' Pairs:

Fixed Pair (e.g., '01'): Contributes 1×2k to the sum.

One '?' (e.g., '0?'): The '?' will be '1' in half the cases (2k−1), causing a mismatch.

Two '?'s ('??'): In the four combinations (00, 01, 10, 11), two result in mismatches, contributing 2×2k−2 per pair.

Modulo Arithmetic: Perform all additions and multiplications modulo 109+7.

Try solving now

3. Restaurant Customers

Moderate
15m average time
85% success
0/80
Asked in companies
Deutsche BankExpedia GroupD.E.Shaw

Ninja is the manager of a restaurant. There were ‘N’ customers who visit the restaurant. Ninja is interested in calculating what was the maximum number of customers in the restaurant at a time. He finds this problem is tough for him, so he wants your help.

You are given the arrival and leaving time of ‘N’ customers in the form of arrays named ‘ARRIVAL’ and ‘LEAVING’. Your task is to find the maximum number of customers at any point in time.

Note :
All arrival and leaving times are distinct.
Problem approach

Logic Steps

Search Space: The possible answer (the maximized minimum rating) lies between the minimum and maximum values present in the matrix.

Binary Search: Pick a middle rating X. Check if it's possible to select (n−2) products such that every customer has at least one product with a rating ≥X.

Feasibility Check (The "Check" Function):

For each product, create a bitmask (or boolean array) representing which customers are "satisfied" (rating ≥X) by that product.

Since you must pick n−2 products, it is easier to think about the 2 products you leave out.

You need to find if there exist products such that their union covers all n customers. If m is large but n is small, you can use bitmasks. If n is large, look for a product that covers many customers and check if the remaining gaps can be filled.

Maximize X: If X is feasible, try a higher value; otherwise, try lower.

Try solving now

4. Operating System

Hybrid Search: Consider a sorted list: 12 43 65 78 98 101 187. If a "Hsearch" technique compares the middle element first and then searches linearly in the appropriate half, how many comparisons are made to find the number 187?

Problem approach

Tip 1:Solve these types of questions from the internet.

5. Prefix to Infix

Easy
10m average time
90% success
0/40
Asked in companies
HikeInfo Edge India (Naukri.com)Samsung

You are given a string denoting a valid Prefix expression containing ‘+’, ’-’, ’*’, ‘/’ and lowercase letters.


Convert the given Prefix expression into an Infix expression.


Note:
Infix notation is a method of writing mathematical expressions in which operators are placed between operands. For example, "a + b" represents the addition of a and b.

Prefix notation is a method of writing mathematical expressions in which operators are placed before the operands. For example, "+ a b" represents the addition of a and b.

Expression contains lowercase English letters, ‘+’, ‘-’, ‘*’, and  ‘/’. 


Example:
Input: /-ab+-cde

Output: ((a-b)/((c-d)+e))

Explanation:
In this test case, there are four operators ‘/’, ‘-’, ‘+’, ‘-’.
Prefix expression:  /-ab+-cde. 
The operator between  ‘a’ and ‘b’ is ‘-’. Resulting expression: /(a-b)+-cde.
The operator between  ‘c’ and ‘d’ is ‘-’. Resulting expression: /(a-b)+(c-d)e.
The operator between ‘c-d’ and ‘e’ is +. Resulting expression: /(a-b)((c-d)+e).
The operator between ‘a-b’ and ‘((c-d)+e)’ is ‘/’. Resulting expression: ((a-b)/((c-d)+e)).
Try solving now

6. Triangle Puzzle

Geometry & Patterns: Some balls are arranged in rows to form an equilateral triangle (the 1st row has 1 ball, the 2nd has 2, and so on). If 472 balls are added, they can form a square in which each side has 7 balls fewer than the side of the original triangle. Find the initial number of balls.

7. Coin Probability

Probability: Rajesh and Ramesh each have a 5, 10, and 20 paise coin. They randomly select one. If the sum is odd, Rajesh wins; if even, Ramesh wins. Find the probability that Rajesh wins exactly one odd and one even coin in the first two games.

02
Round
Easy
Video Call
Duration60 minutes
Interview date14 Nov 2025
Coding problem2

1. Palindrome Partitioning

Moderate
25m average time
75% success
0/80
Asked in companies
QualcommMorgan StanleyQuikr

You are given a string 'S'. Your task is to partition 'S' such that every substring of the partition is a palindrome. You need to return all possible palindrome partitioning of 'S'.

Note: A substring is a contiguous segment of a string.

For Example:
For a given string “BaaB”
3 possible palindrome partitioning of the given string are:
{“B”, “a”, “a”, “B”}
{“B”, “aa”, “B”}
{“BaaB”}
Every substring of all the above partitions of “BaaB” is a palindrome.
Problem approach

Given N≤5000, an O(N2) approach is efficient enough. Here are the steps to solve it:
Step 1: Precompute Palindromes

Before solving the partitioning part, you need to know if any substring s[i…j] is a palindrome.

Create a 2D boolean table isPal[N][N] where isPal[i][j] is true if s[i…j] is a palindrome.

Base cases: All single characters are palindromes (isPal[i][i] = true). Two adjacent identical characters are palindromes (isPal[i][i+1] = (s[i] == s[i+1])).

Transitions: For length L>2: isPal[i][j] = (s[i] == s[j] && isPal[i+1][j-1]).

This takes O(N2) time.

Step 2: Define the DP State

Let dp[i] be the maximum number of valid partitions possible for the prefix s[0…i−1].

Initialize dp[0] = 0 (zero partitions for an empty string).

Initialize all other dp[i] = -1 (to represent that a valid partition ending at i hasn't been found yet).

Step 3: Transitions

Iterate through the string from i=1 to N. For each i, check all possible previous partition points j:

For each j such that 0≤j≤i−k:

Check if the current segment s[j…i−1] is a palindrome using your isPal table.

Check if the segment length is ≥k (this is handled by the loop constraint j≤i−k).

Check if the prefix ending at j was successfully partitioned (dp[j] != -1).

Update Rule: If all conditions are met:
dp[i]=max(dp[i],dp[j]+1)

Step 4: Final Answer

The answer will be stored in dp[N]. If dp[N] is still -1, it means the string cannot be partitioned according to the rules.

Try solving now

2. Core Concepts

  • What is a namespace?
  • What happens when I click alpha/google.com?
  • What is the difference between a semaphore and a mutex? (Learn)
  • What are vtable and vptr, and how do they work?
  • What is a deadlock? How does it happen? How can it be prevented? (Learn)
03
Round
Easy
Video Call
Duration45 minutes
Interview date14 Nov 2025
Coding problem1

1. Ride System

Design a system where riders can book a cab and drivers can accept or reject rides. The system should handle matching a rider with the nearest available driver, calculating the fare based on distance and vehicle type, and managing the ride lifecycle (Requested, In Progress, Completed).

Here's your problem of the day

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

Skill covered: Programming

Which data structure is used to implement a DFS?

Choose another skill to practice
Similar interview experiences
SDE - 1
4 rounds | 7 problems
Interviewed by D.E.Shaw
12879 views
1 comments
0 upvotes
SDE - 1
2 rounds | 4 problems
Interviewed by D.E.Shaw
3190 views
0 comments
0 upvotes
SDE - 1
3 rounds | 10 problems
Interviewed by D.E.Shaw
1285 views
0 comments
0 upvotes
SDE - 1
3 rounds | 3 problems
Interviewed by D.E.Shaw
0 views
0 comments
0 upvotes
Companies with similar interview experiences
company logo
SDE - 1
5 rounds | 12 problems
Interviewed by Amazon
115355 views
24 comments
0 upvotes
company logo
SDE - 1
4 rounds | 5 problems
Interviewed by Microsoft
58428 views
5 comments
0 upvotes
company logo
SDE - 1
3 rounds | 7 problems
Interviewed by Amazon
35236 views
7 comments
0 upvotes