3 ms·
You could write the same solution in prolog. The difference between yours and the original solution is the latter follows the original program specification and
by doublec 8y ago
You could write the same solution in prolog. The difference between yours and the original solution is the latter follows the original program specification and is easier to compare to it. That is, it defines what the problem is, not how to solve it.