Company: D. E. Shaw India
Status: Selected
Qualification: BTech in CSE from Tier-I College in India
Position: Software Engineer
Location: India
Interview Process (Off-campus hiring): Online Assessment -> 3 Technical Rounds → Hiring Manager Round
Online Assessment:
OA Questions
Introduction + Discussion about my Summer Internship Project
DSA Coding Question
Problem:
Design a dashboard for a Codeforces-like platform to show the top 10 programmers who have solved the most problems.
You receive a stream of updates in the form:
{'username': <number_of_problems_solved>}At any instant, the dashboard should reflect the current top 10.
Approach:
I used an ordered multiset in C++ to:
Why not a heap?
The interviewer initially suggested a min-heap, but I explained:
He was satisfied with the explanation.
Result:
Questions on OOP Principles, OS and DBMS - Acid properties
Questions on Projects in my Resume
Introduction + Discussion about my Summer Internship Project
DSA Coding Question
Problem:
You are given two integer matrices A and B of size n × m.
You are allowed to perform the following operation on matrix A any number of times:
k × k, where k ≥ 2) and transpose it in place. That is, the element at position (i, j) in the submatrix becomes the element at position (j, i) within that submatrix.Your task is to determine whether it's possible to transform matrix A into matrix B using zero or more such operations.
Input:
Two integers n and m — the number of rows and columns. (1 ≤ n, m ≤ 500)
An n × m matrix A
An n × m matrix B
Each matrix element satisfies 1 ≤ A[i][j], B[i][j] ≤ 10^9.
Output: Print "YES" if it's possible to transform A into B using the allowed operations, otherwise print "NO".
Approach:
The key observation is:
Operations only affect elements inside square submatrices.
If you look at the diagonals defined by i + j = const (i.e., bottom-left to top-right), the multiset of values on these diagonals remains invariant under such operations.
Moreover, it's possible to permute elements arbitrarily on each diagonal.
So:
For each diagonal index d = i + j, collect all elements in A and B on that diagonal.
Compare the multisets of these diagonals between A and B.
If all corresponding diagonals match in multiset → return YES, else NO.
Result:
Solved in ~30 minutes.
Interviewer was satisfied with the diagonal-invariant observation and explanation.
Overview:
You run a furniture shop and are asked to design the system.
Questions asked:
i) Design a high-level system with relevant classes and attributes.
ii) Draw a class diagram showing relationships between entities like Product, Category, Inventory, Order, Payment, Customer, etc.
Result: Took around 50 minutes to complete.
OS Questions:
mutexDBMS Questions:
Behavioral Questions:
Write a basic class in C++
Show different ways to invoke constructors:
new)Memory layout questions:
Given:
class Car {
public:
Car(int x) { /* constructor logic */ }
};
Car c1 = Car(10);
Car* c2 = new Car(10);c1 and c2 stored?Given a function:
void func() {
Car c1 = Car(10);
Car* c2 = new Car(10);
}c1 and c2 after the function returns?Given classes A, B, C, and D:
B inherits from AC inherits from AD inherits from both B and CA, B, C have their own print() methodsD does not have a print() methodWhat happens when we call d->print()?
print() function gets invoked?Discussion on:
You are given a stream of stock updates:
{timestamp, price, company_name, offset}timestamp field is not the true arrival time.timestamp + offsetYour task:
My Approach:
Use a min-heap (priority queue) to buffer incoming records.
Write to the file only when:
current_timestamp + min_offset > pq.top().true_timestamppq.pop() and write to file.Push new incoming records into the heap with:
pq.push({timestamp + offset, ...})After completing the above technical rounds, I was scheduled for a phone interview with HR.
In this call, they informed me that I was offered a role at D. E. Shaw. 🎉