← Questions
K-th largest value over the last N seconds of a stream
0
I was asked this
No reports yet. Sign in to say where you were asked it.
Start with finding the k-th largest element of an array. Then values arrive with timestamps and queries ask for the k-th largest among values from the last N seconds; design a structure that handles inserts, expiry and queries efficiently.
No official answer yet. Write yours on the right and run it.
Nothing published yet.
Write and test your solution herePython in your browser, the question's tests level by level, saved for you.Sign in to start coding
