AlgorithmsHard
Write an algorithm to find the median of a stream of numbers.
Use two heaps (max heap for lower half, min heap for upper half) to maintain the median.
CV của bạn đã thể hiện đúng kỹ năng này chưa?
Biết trả lời câu hỏi mới là một nửa. Nửa còn lại là CV phải khiến nhà tuyển dụng mời bạn phỏng vấn. Chấm điểm CV so với JD bằng AI chỉ trong vài giây.
Câu hỏi liên quan về Algorithms
- Implement a function to check if a binary tree is balanced.
- Find the Kth largest element in a stream of numbers.
- Implement Google's PageRank algorithm.
- Optimize a search algorithm for a large dataset in a distributed environment.
- Create a system to efficiently match job seekers with job postings.
- Develop an autonomous vehicle's path planning algorithm.