Algorithms and problem solving