Pergunta de entrevista da empresa Morgan Stanley

Rotate a string twice and check whether its same as first string. Given a map of source and destination, get the smallest path to reach it