How to solve this question?

Revision en1, by angry_pikachu, 2022-12-10 06:39:16

Source — Link

Given a string with lowercase letters and “?” where each “?” can be replaced by any lowercase character, find the total number of strings such that the first and last characters are the same and no adjacent characters are the same.

I am still new to DP, help would be appreciated


  Rev. Lang. By When Δ Comment
en1 English angry_pikachu 2022-12-10 06:39:16 420 Initial revision (published)