Generalized methods in IoUtils and ArrayUtils
Solution for problem 21
Solution for problem 22