Moveworks interview question

The coding interview was a hangman problem