Algorithms for school