algorithm course and problem