Algorithms and programming : Problems and solutions.