Pregunta de entrevista de Jio

I was asked write a code for anagram words