Code360 powered by Coding Ninjas X Naukri.com. Code360 powered by Coding Ninjas X Naukri.com
D.E.Shaw interview experience Real time questions & tips from candidates to crack your interview

SDE - Intern

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

Interview preparation journey

expand-icon
Preparation
Duration: 8 months
Topics: Data Structures, Pointers, OOPS, System Design, Algorithms, Dynamic Programming, graphs, trees
Tip
Tip

Tip 1 : Practice more.
Tip 2 : Solve questions on Coding ninjas and Leetcode.
Tip 3 : Make good projects.

Application process
Where: Campus
Eligibility: Above 7 cgpa, branch-cse or ece
Resume Tip
Resume tip

Tip 1 : Keep it short.
Tip 2 : Mention your projects in brief.

Interview rounds

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

2 coding questions

1. Check 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.
Try solving now

2. Reverse Linked List

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

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
02
Round
Medium
Video Call
Duration45 minutes
Interview date10 Aug 2020
Coding problem1

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

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

What does HTML stand for?

Choose another skill to practice
Join the Discussion
1 reply
Pucha Naveen Kumar 28 Aug, 2021

they have asked u only Btech academics or 12th and 10th also

0 replies
0 upvotes
Reply
Report
Similar interview experiences
SDE - Intern
1 rounds | 1 problems
Interviewed by D.E.Shaw
783 views
0 comments
0 upvotes
SDE - Intern
3 rounds | 6 problems
Interviewed by D.E.Shaw
413 views
0 comments
0 upvotes
SDE - Intern
3 rounds | 6 problems
Interviewed by D.E.Shaw
545 views
0 comments
0 upvotes
SDE - Intern
3 rounds | 5 problems
Interviewed by D.E.Shaw
500 views
0 comments
0 upvotes
Companies with similar interview experiences
company logo
SDE - Intern
3 rounds | 6 problems
Interviewed by Amazon
13476 views
4 comments
0 upvotes
company logo
SDE - Intern
4 rounds | 7 problems
Interviewed by Microsoft
12593 views
1 comments
0 upvotes
company logo
SDE - Intern
2 rounds | 4 problems
Interviewed by Amazon
8983 views
2 comments
0 upvotes