Going to base the answer to problem 20 off my answer to problem 19, as they are similar
Generating all strings of length n, need to adjust sorting algorithm before solution is final.