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

SDE - Intern

D.E.Shaw
upvote
share-icon
1 rounds | 2 Coding problems

Interview preparation journey

expand-icon
Preparation
Duration: 3 months
Topics: Data Structures, Pointers, OOPS, System Design, Algorithms, Dynamic Programming,array, linked list, hashmap
Tip
Tip

Tip 1 : Practice on gfg
Tip 2 : Compete on codechef
Tip 3 : Learn DSA

Application process
Where: Campus
Eligibility: Above 7 CGPA
Resume Tip
Resume tip

Tip 1 : Mention all projects
Tip 2 : Don't write anything that you don't know

Interview rounds

01
Round
Hard
Online Coding Interview
Duration75 minutes
Interview date4 Aug 2020
Coding problem2

It was a coding round on Hackerrank.

1. Validate BST

Moderate
25m average time
70% success
0/80
Asked in companies
FacebookAmazonMicrosoft

Given a binary tree with N number of nodes, check if that input tree is Partial BST (Binary Search Tree) or not. If yes, return true, return false otherwise.

A binary search tree (BST) is said to be a Partial BST if it follows the following properties.

• The left subtree of a node contains only nodes with data less than and equal to the node’s data.
• The right subtree of a node contains only nodes with data greater than and equal to the node’s data.
• Both the left and right subtrees must also be partial binary search trees.
Example:

Input:

BST1

Answer:

Level 1: 

All the nodes in the left subtree of 4 (2, 1, 3) are smaller 
than 4, all the nodes in the right subtree of the 4 (5) are 
larger than 4.

Level 2 :

For node 2:
All the nodes in the left subtree of 2 (1) are smaller than 
2, all the nodes in the right subtree of the 2 (3) are larger than 2.
For node 5:
The left and right subtree for node 5 is empty.

Level 3:

For node 1:
The left and right subtree for node 1 are empty.
For node 3:
The left and right subtree for node 3 are empty.
Because all the nodes follow the property of a Partial binary 
search tree, the above tree is a Partial binary search tree.
Problem approach

Keep the maximum and minimum range of values that are possible for each and every node and keep on recursively calling the same function for the children of current node, if it's not satisfying at any point, return false

Try solving now

2. Reverse Linked List

Moderate
15m average time
85% success
0/80
Asked in companies
GE (General Electric)Tata 1mgFreshworks

Given a singly linked list of integers. Your task is to return the head of the reversed linked list.

For example:
The given linked list is 1 -> 2 -> 3 -> 4-> NULL. Then the reverse linked list is 4 -> 3 -> 2 -> 1 -> NULL and the head of the reversed linked list will be 4.
Follow Up :
Can you solve this problem in O(N) time and O(1) space complexity?
Problem approach

Maintain three pointers next, curr, previous and at every stage make prev=curr, curr=next and next=next->next
At the end when null occurs, make curr as head and return head

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

Which operator is used for exponentiation in Python?

Choose another skill to practice
Similar interview experiences
SDE - Intern
1 rounds | 1 problems
Interviewed by D.E.Shaw
819 views
0 comments
0 upvotes
SDE - Intern
2 rounds | 3 problems
Interviewed by D.E.Shaw
1849 views
1 comments
0 upvotes
SDE - Intern
3 rounds | 6 problems
Interviewed by D.E.Shaw
453 views
0 comments
0 upvotes
SDE - Intern
3 rounds | 6 problems
Interviewed by D.E.Shaw
583 views
0 comments
0 upvotes
Companies with similar interview experiences
company logo
SDE - Intern
3 rounds | 6 problems
Interviewed by Amazon
13855 views
4 comments
0 upvotes
company logo
SDE - Intern
4 rounds | 7 problems
Interviewed by Microsoft
13095 views
1 comments
0 upvotes
company logo
SDE - Intern
2 rounds | 4 problems
Interviewed by Amazon
9196 views
2 comments
0 upvotes