D. E. Shaw & Co OA -On campus for Internship role.
Summary
I completed the D. E. Shaw online assessment for an internship, which consisted of two coding problems and several MCQs.
Full Experience
Hey everyone i am going to share my Deshaw OA that happened on hackerrank.
Note:
Before getting into the coding problem I really wants to tell you something.The question that give to us is not so hard but the way they phrase the question makes it seems impossible to solve.They complicated the question by using real world scenarios.If we read the question and extract the content from the question it is a 3-4 line leetcode level problem.So i am going to give the extracted problem from the question..
OA PATTERN
2 Coding problems.
25 mcqs from sql,C++ output prediction those are bit complicated and have very minimum time to solve that.
20 mcqs from aptitude that needs intense preperation to solve within minimum time.
Each questions have a fixed time to solve which is open one after another.
Probelm 1-(15 minutes) The integer array contains positive elements of size n called dataframes.You need to group the dataframes such that the dataframes[i] should divided into atleast two chunks of equal size.If it is impossible to divide the dataframe[i] we can add some frame to that such that it should meet our criteria.
Sample test case:
Input: n=5, [1,6,8,2,5]
Output: 2
Explanation : The dataframe (6,8,2) can divided into two chunks ,But we need to add 1 frame on index dataframe[0] and dataframe[4] thus the result is 2.
problem 2-(20 minutes)
They give the binary string s and frame value integer datatype.Our task is to split the given string into some contiguous substring without any overlap,The below condition should meet for each substring
i)The substring length should atmost of frame size. ii)The substring should not be perfectly alternative.
Example for perfectly alternative:
01 10 1010 etc..
Not perfectly alternative: i)1011 ii)011010 iii)110101 etc...
We need to return the minimum number of contiguous substring
Sample test case:
Input:
s="101101",frame=4
ouput: 3
Explanation: One optimal split is 1011 | 0 | 1
Honest Advice: I highly recommended all guys to spend some minimal time to solve some problems atleast read the problem statement in platforms like Hackerrank,Hackerearth,Codeforces thats allows us to understand the problem statement from complex real world scenarios where leetcode fails to give us.
It takes some valuable time to write this blog so i requested you all guys to like this block and comment so that it reaches others
Interview Questions (2)
Divide Dataframes into Equal Chunks
Given an integer array dataframes of size n containing positive elements, each element dataframes[i] must be divided into at least two chunks of equal size. If it is impossible to divide dataframes[i] as is, you may add the minimum number of frames (elements) to make such a division possible. Return the total number of added frames needed for the entire array.
Sample Input:
n = 5
dataframes = [1, 6, 8, 2, 5]
Sample Output:
2
Explanation: The element 6, 8, 2 can be divided into two equal chunks, but we need to add one frame to dataframes[0] and one frame to dataframes[4], so the total added frames is 2.
Split Binary String with Frame Constraint
You are given a binary string s and an integer frame. Split s into a set of contiguous substrings without overlap such that:
- The length of each substring is at most
frame. - No substring is a perfectly alternating string (e.g.,
01,10,1010, etc.). Return the minimum possible number of substrings.
Sample Input:
s = "101101"
frame = 4
Sample Output:
3
Explanation: One optimal split is 1011 | 0 | 1.
Preparation Tips
I highly recommended all guys to spend some minimal time to solve problems and read problem statements on platforms like Hackerrank, Hackerearth, and Codeforces to get used to complex real‑world scenarios.