d.e. shaw logo
D. E. Shaw· summer intern '26

D.E. shaw Online assessment (summer intern '26)

Location
online
Posted
15 Jul 2025
392 reads

Summary

I participated in the D.E. Shaw Online Assessment for a summer intern position, which consisted of three coding questions to be solved within one hour on Hackerrank.

How it went

Three coding questionI(DSA) and 1 hour was given to solve the problems. Mode: online , hackerrank

Questions asked (3)

  1. 01

    Binary String Triplet with Distinct Adjacent Values

    Data Structures & Algorithms

    Given a binary string s of length n (each character is '0' or '1').

    Find the number of ways to pick three indices i < j < k such that:

    s[i] != s[j] (no two adjacent picks have the same value)

    s[j] != s[k]

    constraint : n <=2 * 10 ^ 5

  2. 02

    Minimize Moves to Make Task Groups Non-Increasing

    Data Structures & Algorithms

    You have n groups of tasks in a line. Each group i has tasks[i] tasks.

    You can do the following operation any number of times:

    Choose a group i (1 ≤ i ≤ n):

    If i > 1, move 1 task from group i to group i-1.

    This changes: tasks[i] -= 1 tasks[i-1] += 1 If i < n, move 1 task from group i to group i+1.

    This changes: tasks[i] -= 1 tasks[i+1] += 1 Each such move costs 1.

    return the minimum number of moves required to make array non-increasing.

    constaint : n <= 250

  3. 03

    Count Valid Arrays with Time Complexity Constraints

    Data Structures & Algorithms

    You are given an array a of length n. Each a[i] represents the time complexity allowed at position i.

    Your task is to count the number of valid arrays b of length n satisfying:

    For each position i (1 ≤ i ≤ n), 1 ≤ b[i] ≤ a[i].

    No two consecutive elements are equal, i.e. b[i] ≠ b[i+1] for all 1 ≤ i < n.

    Since the answer may be large, print it modulo 998244353.

    Input The first line contains a single integer n (1 ≤ n ≤ 2⋅10^5), the length of the array.

    The second line contains n integers a[1], a[2], ..., a[n] (1 ≤ a[i] ≤ 10^9).

    Output Print a single integer — the number of valid arrays b modulo 998244353

Know someone preparing? Send it to them:WhatsAppLinkedInX

Interviewed at D. E. Shaw recently?

Write up your rounds while you still remember the questions. It helps the next person more than you would think.

Share your experience
Discussion 0

Questions for the author, or how your own interview compared.

Join the discussion

Sign in with Google to comment or ask the author a question.

No comments yet

Be the first to share your thoughts and start the discussion!