Algorithms for challenges