Skip to content
Related Articles

Related Articles

Improve Article

DE Shaw Interview Experience for SDE | Off-Campus 2021

  • Last Updated : 16 Jun, 2021

Online Coding Round: There were three coding questions and MCQs. Each section had a fixed allocated time. MCQs were based on general problem-solving skills and CS fundamentals.

Coding Questions:

  1. Two players A and B play a stone game on the positive x-axis, the stone is initial at point 0 and you are given a point N. On each move, the player can move the stone by i2 (i > 0) steps towards point N. The player wins if he can move the stone to point N. You need to output which player will win. (Note: stone can never move beyond point N)
    Example:
    Input: 5
    Output: B
    Explanation:
    Player A can either move 
    the stone by 1(1*1) or 4(2*2). 
    No matter which move player A chooses,
    Player B can always choose a move to 
    reach 5 and win.
  2. Given an array of N numbers, you need to output the maximum value V among all the subarrays where value V for a subarray A[L..R] is defined as sum(A[L…R])*MAX(A[L…R]) 1 <= L  <= R <= N.

    Constraints: 1 <= A[i] <= 1e9, 1 <= N <= 1e5

    Example:
    Input: 1 -1 2 3 -4
    Output: 15
    Explanation:
    The subarray which gives maximum
    value V is A[3..4] = {2,3}, 
    V = (2+3)*MAX(2,3) = 5*3 = 15

There was one more question which I don’t remember.

I was able to solve most of the MCQs and one coding question partially.



After 10 days I got a call for my first technical interview.

Round 1(Technical Interview): Duration: 1hr

The interview was conducted on the hackerrank codepair platform. The interview asked me to introduce myself as well as share my internship project details. Then he asked me some follow-up questions about my internship project for about 5 minutes.

Then he moved onto questions related to CS fundamentals:

  1. Compiler phases
  2. Linker and Loader
  3. How the program is stored in memory? (https://www.geeksforgeeks.org/memory-layout-of-c-program/)
  4. If my PC has 8 GB of RAM and I open a file of size 50 GB in an editor. What are the possible outcomes?

DSA:

  1. Implement a random function that has the following requirements:

    a. Random number generated must be completely unpredictable

    b. Performance should be good

    I gave him a solution based on using the current timestamp and multiplying it with a prime number to generate the random number. He said that’s a great start but the performance of your function would be slow as the time function you will be using will need to hit the clock every time to get the current time. So, he told me to optimize my solution. I kept sharing my thought process but was not able to come up with anything that works. After a few minutes, the interviewer moved on to the next question.

  2. Given an array of distinct elements, you can choose any subset from the array and reorder them. You can place following operators between them: +, -, *, /, (, ) and evaluate the value of the expression. Your task is to find the minimum positive number which cannot be formed using the array elements. You can use the elements of an array only once for an expression.
    Example:
    Input: [1, 2]
    Output: 4
    Explanation:
    1 and 2 are already present in the array.
    You can make 3 by adding 1 and 2 i.e. 3 = 1+2
    There no possible way to make 4.

    I was only able to tell the brute force approach and time complexity for this problem. He asked me to optimize it. I shared some ideas and made some analogy with the subset sum problem, but in the end, I was unable to solve the problem.

Verdict: Rejected

All the best!!

Attention reader! Don’t stop learning now. Get hold of all the important DSA concepts with the DSA Self Paced Course at a student-friendly price and become industry ready. To complete your preparation from learning a language to DS Algo and many more, please refer Complete Interview Preparation Course. In case you are prepared, test your skills using TCS, Wipro, Amazon. GoogleE-Litmus and Microsoft Test Serieses.

My Personal Notes arrow_drop_up
Recommended Articles
Page :