D. E. Shaw & Co. | SDE (New Grad) | India | May 2025 [Offer]

d. e. shaw & co. logo
d. e. shaw & co.
Software EngineerIndia
April 10, 2025 β€’ 10 reads

Summary

I was selected for a Software Engineer position at D. E. Shaw & Co. in India after an off-campus hiring process that included an Online Assessment, three technical rounds, and a final HR discussion.

Full Experience

Online Assessment: OA Questions

Round 1: Screening Round βœ…

  1. Introduction + Discussion about my Summer Internship Project

  2. 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:

  • Keep track of users sorted by problem count.
  • Insert/update user entries as new data comes in.
  • Maintain only the top 10 by removing the lowest when size > 10.
  • Easily iterate and display the top 10 on the dashboard.

Why not a heap?
The interviewer initially suggested a min-heap, but I explained:

  • Heaps aren’t directly iterable for dashboard display.
  • We'd need to pop all elements and reinsert them to display.
  • A multiset is better suited for ordered iteration + updates.

He was satisfied with the explanation.

Result:

  • Took me ~25 mins to implement.
  • Interviewer was happy with both the reasoning and the code.
  1. Questions on OOP Principles, OS and DBMS - Acid properties

  2. Questions on Projects in my Resume

Round 2: Detailed Interview - I βœ…

  1. Introduction + Discussion about my Summer Internship Project

  2. 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:

  • Choose any square submatrix (of size 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.

  1. CS Questions
  • OOP: Virtual functions, compile-time vs. runtime polymorphism
  • CS Concepts: Webpack bundlers, design patterns, code smells
  • DBMS: SQL vs. NoSQL

Round 3: Detailed Interview - II βœ…

  1. System Design Question

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.

  1. CS Questions
  • OS Questions:

    • Define Deadlock
    • What are the 4 necessary conditions for deadlock?
    • Write a C++ program that demonstrates a deadlock using mutex
  • DBMS Questions:

    • SQL vs NoSQL – key differences
    • Examples of relational databases
  • Behavioral Questions:

    • What projects did you work on during your summer internship?
    • What challenges did you face (technical or communication)?
    • How did you collaborate with your team?
  1. C++ OOP and Memory Layout
  • Write a basic class in C++

  • Show different ways to invoke constructors:

    • One with object as return type
    • Another using a pointer (new)
  • Memory layout questions:

    • Where are pointers and objects stored in program memory?
    • Discuss:
      • Stack
      • Heap
      • Data section
      • Code section
  • Given:

    class Car {
    public:
        Car(int x) { /* constructor logic */ }
    };
    
    Car c1 = Car(10);
    Car* c2 = new Car(10);
    
    • Where are c1 and c2 stored?
  • Given a function:

    void func() {
        Car c1 = Car(10);
        Car* c2 = new Car(10);
    }
    
    • What happens to c1 and c2 after the function returns?
  1. C++ Inheritance and Diamond Problem
  • Given classes A, B, C, and D:

    • B inherits from A
    • C inherits from A
    • D inherits from both B and C
    • A, B, C have their own print() methods
    • D does not have a print() method
  • What happens when we call d->print()?

    • Which print() function gets invoked?
  • Discussion on:

    • Diamond problem
    • Virtual Inheritance
  1. DSA Question – Stock Stream Ordering
  • You are given a stream of stock updates:

    {timestamp, price, company_name, offset}
    
    • The timestamp field is not the true arrival time.
    • The true time = timestamp + offset
    • Each company has a fixed offset
  • Your task:

    • Write records to a file in correct order of true timestamp
    • The file must be always consistent (i.e., no out-of-order records)
  • 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_timestamp
      
      • Then: pq.pop() and write to file.
    • Push new incoming records into the heap with:

      pq.push({timestamp + offset, ...})
      

Interview Questions (15)

Q1
Top 10 Programmers Dashboard
Data Structures & Algorithms

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.

Q2
Matrix Transformation by Square Transposition
Data Structures & Algorithms

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:

  • Choose any square submatrix (of size 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".

Q3
Furniture Shop System Design
System Design

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.
Q4
Deadlock Definition
OtherEasy

Define Deadlock

Q5
Conditions for Deadlock
OtherEasy

What are the 4 necessary conditions for deadlock?

Q6
C++ Deadlock Demonstration
OtherMedium

Write a C++ program that demonstrates a deadlock using mutex

Q7
Summer Internship Projects
Behavioral

What projects did you work on during your summer internship?

Q8
Challenges Faced in Projects
Behavioral

What challenges did you face (technical or communication)?

Q9
Team Collaboration Experience
Behavioral

How did you collaborate with your team?

Q10
C++ Constructor Invocation
OtherEasy

Show different ways to invoke constructors:

  • One with object as return type
  • Another using a pointer (new)
Q11
Memory Layout: Pointers and Objects
OtherMedium

Where are pointers and objects stored in program memory? Discuss:

  • Stack
  • Heap
  • Data section
  • Code section
Q12
C++ Memory Layout Example 1
OtherMedium

Given:

class Car {
public:
    Car(int x) { /* constructor logic */ }
};

Car c1 = Car(10);
Car* c2 = new Car(10);
  • Where are c1 and c2 stored?
Q13
C++ Memory Layout Example 2
OtherMedium

Given a function:

void func() {
    Car c1 = Car(10);
    Car* c2 = new Car(10);
}
  • What happens to c1 and c2 after the function returns?
Q14
C++ Diamond Problem with Inheritance
OtherMedium

Given classes A, B, C, and D:

  • B inherits from A
  • C inherits from A
  • D inherits from both B and C
  • A, B, C have their own print() methods
  • D does not have a print() method

What happens when we call d->print()?

  • Which print() function gets invoked?

Discussion on:

  • Diamond problem
  • Virtual Inheritance
Q15
Ordered Stock Stream to File
Data Structures & Algorithms

You are given a stream of stock updates:

{timestamp, price, company_name, offset}

The timestamp field is not the true arrival time. The true time = timestamp + offset Each company has a fixed offset

Your task:

  • Write records to a file in correct order of true timestamp
  • The file must be always consistent (i.e., no out-of-order records)
Discussion (0)

Share your thoughts and ask questions

Join the Discussion

Sign in with Google to share your thoughts and ask questions

No comments yet

Be the first to share your thoughts and start the discussion!