Algorithms class work