using algorithms to solve problems can be compared to