Jio Interview Question

I was asked write a code for anagram words