>>55498595You're not a computer scientist, so I'll let you know: I said the problem is NP-hard, which essentially means that it takes exponential running time. (e.g. 2^1000 is more than the number of atoms in the observable universe squared). To see why it would blow up so fast: say you choose the first pokemon. Now you say you have two choices for the next pokemon, and 2 choices for the next pokemon, and 2 choices for the next pokemon, etc, all the way until the last (potentially 1000th) pokemon is chosen. How many potentially paths would you have to check? You multiply the number of possible choices at each step, and you get 2^1000 paths that you'd have to check, which is completely infeasable.
The only hope is that by doing a clever search that prunes branches in a smart way, you get lucky and find a shiritori that hits every pokemon (if you can hit every pokemon, then you're golden because there's no reason to search any further for a better answer, you've found the best possible one).
If you're studying Computer Science, good luck desu.