Microsoftseniorfev. de 2026
The question was exactly to print the top K largest elements in a data stream and the follow up was to find the median of the stream.
Maintain the kth largest element in a dynamic stream: implement a class initialized with k and an initial array that supports add(val) and returns the current kth largest after each insertion. Expect up to 10^4 add operations, so updates must be more efficient than resorting the whole list each time.
Use esses exemplos para entender em que contexto ela costuma cair e adaptar sua prática.
The question was exactly to print the top K largest elements in a data stream and the follow up was to find the median of the stream.
Nenhum anexo público associado a esta pergunta.
No app você encontra perguntas parecidas, compara empresas e aprofunda essa busca com mais filtros.