Added brute force solution to problem 5