Streams & Time Windows
Rubrik's algorithms round is separate from System Coding, and it often asks about data that keeps arriving. A value comes in and you answer for the last K values. A query names a time and you look back x seconds. In each case you keep a small piece of state current as items enter and leave the window, instead of rebuilding it on every call.
One comes up more than the others. Each of the three keeps a small structure current as values enter and leave, whether that's an ordered set, two pointers or a shrinking range.
Built-in libraries are sometimes off limits in this round too. If the interviewer bans a sorted map, say which balanced tree you'd write and what each operation costs, then code the window logic on top of it. The problems below show each one in code you can run.
RubrikPremium lesson · Coding round
The 3 Rubrik problems are below.
- A Premium questionCoding · Hard
- A Premium questionCoding · Medium
- A Premium questionCoding · Medium
Each with hints, the follow-up and a tested solution.
Get the Rubrik questions$49 a year · all 100 companies · cancel anytime
From 202 Rubrik reports, forum threads behind logins and write-ups in Chinese.
Rubrik interview guideKnow what Rubrik asks before you walk in.
32 coding · 3 system design · 15 behavioral questions
Get their questions first.
InterviewLegend is independent and not affiliated with or endorsed by any company it covers.