D.E.Shaw CodePair Round | off-campus

deshaw logo
deshaw
July 30, 20210 reads

Summary

I recently went through an off-campus CodePair round interview with D.E.Shaw, which was conducted on Hackerrank and involved a variety of coding, technical concepts, and a puzzle.

Full Experience

The CodePair round for D.E.Shaw was an off-campus interview conducted on Hackerrank. It started with a challenging coding problem that required careful thought. Following the coding task, I was presented with several conceptual questions covering fundamental programming differences and system design considerations. The round concluded with a well-known logic puzzle.

Interview Questions (5)

Q1
Smallest Subarray with Max Frequency Element
Data Structures & AlgorithmsMedium

Given an array, A. Let x be an element in the array. x has the maximum frequency in the array. Find the smallest subarray length of the array which also has x as the maximum frequency element.

e.g.
Input : arr[] = {4, 1, 1, 2, 2, 1, 3, 3}
Output : 5
The most frequent element is 1. The smallest
subarray that has all occurrences of it is
1 1 2 2 1

Q2
Difference between #include<stdio.h> and #include "stdio.h"
OtherEasy

Explain the difference between #include&lt;stdio.h&gt; and #include "stdio.h" in C/C++.

Q3
Difference between Definition and Declaration
OtherEasy

Describe the difference between definition and declaration in the context of any programming language.

Q4
Divisibility Check on Infinite Bit Stream
Data Structures & AlgorithmsMedium

There is an infinite stream of bits (0/1) coming. At each bit, you need to check whether the number formed from bits till that point is divisible by a given N or not. How will you approach this problem? You cannot store the entire stream anywhere as it is infinite.

e.g.
N = 14
stream = 10101100100010001010010.....

We need to answer at each bit coming from left to right.

Q5
Camel and Bananas Transport Puzzle
OtherMedium

A person has 3000 bananas and a camel. The person wants to transport the maximum number of bananas to a destination which is 1000 KMs away, using only the camel as a mode of transportation. The camel cannot carry more than 1000 bananas at a time and eats a banana every km it travels. What is the maximum number of bananas that can be transferred to the destination using only the camel (no other mode of transportation is allowed)?

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!