Don't overthink, Just howl28 Feb 2021
It must consist of a combination of the letters A, H, O and W. Each letter must occur at least once.
The howl can not contain two consecutive W’s, or two consecutive H’s.
The howl can not contain an H followed immediately by a W or an A.
There can never be an A after the first occurrence of an O.
At first I didn’t have a clue how to solve it. I thought that maybe I would have to come up with all sorts of valid combinations and then pick the first one that was longer than the input. Alternatively I could have modified the input by making it longer but still valid. Then I noticed something interesting. The tests for this question was only asking for a longer string even if its just by one character. So why not build my own custom string that just add a bunch of ‘O’ character to the end. Once again Occam’s razor prevails.