DE Shaw | 2022 Grad | OA
Anonymous User
1893

Pattern
Total Duration of Test – 120 mins
Total No. of Sections - 5
Section 1 – One Coding Question - Easy difficulty (20 mins)
Section 2 – One Coding Question - Medium difficulty (30 mins)
Section 3 – One Coding Question - Medium difficulty (30 mins)
Section 4 - Technical MCQs - 10 questions (20 mins)
Section 5 - Aptitude MCQs - 10 questions (20 mins)

Coding Q 1 - (20 min)

Given a list of number and queries contains k and m. where you have to find the kth smallest integer considering mth least significant bits

l = [1,129,9, 802]

k = [2,1]

m =[2, 1]
output - [802,1]

Explanation -

query 1 - k= 2 ,m=2

2 smallest considering 2least significant digits

[1,29,9,02] here 02 would 2nd smallest

query 2 k =1 m=2

1st smallest considrign 1 least significant digit

[1,9,9,2] here 1 would be 1st smallest

Coding Q2 - (Matrix Problem | dont remember exact q | DP Maximization )

Coding Q3 - Minimum number of train platforms

position of engine of a train (start) and position of last car of a train (end) are given find how many platform are needed to fit train with out overlap/ crash | start and end are start position and end of train

Sample 1


enginePos =[1,2]

lastCarPos=[2,3]

o/p 2

Reason trains are 1,2 , 2,3 (as given) | will crash(overlap) hence need 2 platform

Sample 2

enginePos =[1,2]

lastCarPos=[3,4]

o/p 1 Reason no crash 1,2 | 3,4 no overlap

Sample 3

enginePos =[1, 5 ,5, 8 ,8]

lastCarPos=[4, 5, 8, 9, 9]

o/p- 3 |Reason at pos 8 there are 3 trains at i a time so 3 platforms needed;

anyone know efficant answer to Q1

Comments (3)