Solution to the number pairs problem.
Solution to the array absurdity problem.