I was asked this question in amazon phone interview today. Any answers in Python?
Given a continuous unordered stream of all the stars in the universe (more than billions), maintain a list of the closest 100 stars to earth. Also provide a method for accessing the list at any time during the processing of the stream.
input: int id, float dist