D. E. Shaw India | Online Assessment | Off-Campus 2025 Grads | February 2, 2025
Anonymous User
4157

Test Instructions

Overview

  • Total Duration: 120 minutes
  • Total Sections: 5

Section Breakdown

SectionDurationTypeDetails
120 minsCoding1 Question
230 minsCoding1 Question
330 minsCoding1 Question
420 minsTechnical MCQs10 Questions
520 minsAptitude MCQs10 Questions

Programming Sections (Sections 1, 2, and 3)

  • Total Questions: 3
  • Total Time: 80 minutes
  • Rules:
    • You must attempt the first coding question before moving to the next.
    • Once you move to the next question/section, you cannot revisit previous ones.

MCQ Sections (Sections 4 and 5)

  • Technical MCQs: 10 Questions (20 minutes)
  • Aptitude MCQs: 10 Questions (20 minutes)
  • Scoring:
    • Correct Answer: +2 points
    • Wrong Answer: -0.5 points

Topics Covered

  • Technical MCQs:
    • Data Structures and Algorithms
    • Operating Systems
    • Database Systems
    • SQL
    • Computer Networks
  • Aptitude MCQs:
    • Quantitative Aptitude
    • Problem Solving
    • Logical/Verbal Reasoning

Coding Questions

Question 1: Sorting Packets by Transmission Pattern

Problem Statement

You are given an array of packet IDs, each represented as an integer. The transmission pattern of each packet ID is given by its binary representation, where each set bit indicates a point of significant data transfer.

The packetSpan of a packet is defined as the maximum gap between any two consecutive set bits in its binary representation.

Task:

  • Given an array packetIds of size n and an integer K, sort the packets:
    1. In decreasing order of packetSpan.
    2. If two packets have the same packetSpan, sort them in decreasing order of their packet ID.
  • Return the top K packet IDs with the highest packetSpan.

Example

Input: packetIds = [38, 23, 9], K = 2
Binary Representations:
  - 38 -> 100110  (packetSpan = 2)
  - 23 -> 10111   (packetSpan = 1)
  - 9  -> 1001    (packetSpan = 2)
Output: [38, 9]

Question 2: Well-Organized Course Structures

Problem Statement

The department of mathematics offers n courses, where the difficulty of the i-th course is represented by an integer difficulty[i].

A course structure can be created as follows:

  1. Choose a non-empty subarray of courses.
  2. Remove this subarray from the original array.

A well-organized course structure satisfies:

  • The chosen subarray is sorted in increasing order of difficulty.

Task:

  • Given n courses and an array difficulty, find the number of well-organized course structures that can be created.

Example

Input: n = 4, difficulty = [1,2,1,2]
Valid well-organized structures: [1], [2], [1,2], [1,1,2], [1,2,2], [1,2,1], [1,2]
Output: 7

Constraints

1 <= n <= 2 * 10^5
1 <= difficulty[i] <= 10^9

Question 3: Secure Data Transmission

Problem Statement

You are provided with a data package of size n × m, represented by a matrix packages[p][q], where:

  • Each unit contains an encryption code (0 or 1).
  • A unit containing 0 represents a security breach.
  • Any unit within a certain latency threshold from a breach unit is also considered a breach.

Latency Definition:

  • The latency from unit (p, q) to unit (r, s) is given by:
    |p - r| + |q - s|

Task:

  1. Identify all breach units.
  2. Count the number of valid paths from (0,0) to (n-1,m-1) that do not pass through any breach units.
  3. You can only move right or down.
  4. Return the count modulo 10^9 + 7.

Example

Input:
packages = [[1,0],
            [0,1]]
n = 2, m = 2, latencyThreshold = 0

Output: 1

Constraints

1 <= n, m <= 1100
0 <= latencyThreshold <= 700
0 <= packages[i][j] <= 1
Comments (3)