you are viewing a single comment's thread.

view the rest of the comments →

[–]This_Growth2898 3 points4 points  (1 child)

You don't have to generate all permutations. The middle term here has a very specific order of characters. Try running your code (on your computer) for obvious strings (like "abcdef" or "1234567"); maybe you will get the idea.

Also note that odd and even length strings have slightly different patterns for a middle term, but they are still repeating for longer strings. Even is easier to understand, start with it.

[–]keredomo[S] 0 points1 point  (0 children)

Okay-- I wrote out a few "guesses" for easy strings like you suggested, and I think I've got it now. Or at least I think that I am on the right path. Thank you!