practice-algorithm for problem solving