algorythm problems