Added fast algorithm for problem 26