Algorithms for online competitions