shooting stars in the sky an online algorithm for