Stream Transformer: Reconstruct a Sparse Time×Code Matrix Row by Row

Asked at Jane Street · Coding Questions · Difficulty: Medium · Last asked Jul 15, 2026

Convert a stream of sparse `(timestamp, code, value)` records, arriving in batches, into dense rows with one column per code, emitting each row as soon as it is complete.

Loading the problem…