This set of problems evaluates implementation correctness and attention to formatting for a staircase-printing routine alongside distributed-algorithms reasoning for computing a global mode/median, testing algorithmic thinking, I/O handling, synchronization, and communication-cost trade-offs in the Coding & Algorithms domain.

Implement a function that prints a staircase with n rows.
Input
n (n >= 1)
Output
n
lines.
i
(1-indexed) contains
i
items separated by a single space.
n = 1
).
Follow-up: modify the staircase so that it prints consecutive integers across the entire output (e.g., 1, then 2, then 3, continuing across rows), still respecting the “no trailing delimiter” formatting requirement.
You have 10 worker nodes. Each node stores a partition of a dataset of integers locally.
You are given only these primitives:
read_local()
to read bytes from local storage at
10 bytes/second
.
send(node_id, bytes)
which transmits data at
1 byte/second
.
recv(node_id, bytes)
which receives data at
1 byte/second
.
barrier()
for synchronization.
Task
What to discuss while implementing